Se connecter / S'enregistrer

Résolu Comment configurer le service DHCP Server et serveur de Bind DNS sous un serveur debian ?

Solutions (5)
Tags :
  • Config PC
  • Dhcp
  • Debian
  • dns
  • Serveur
  • Internet
|
Bonjour.S'il vous plais comment configurer le service dhcp server et serveur de bind dns sous un serveur debiant ? quelles sont les etapes de configuration de chaque service ? Merci d'avance
  • Meuniers a édité ce message
  • Meuniers a édité ce message
Contenus similaires
Meilleure solution
partage
|
Sous Debian voici ma méthode :

1) Configurer Debconf
2) Installer les paquets voulus
3) Fixer les configurations à la main

1) Configurer Debconf est important car en fonction de son paramétrage les questions posées à l'installation peuvent être plus ou moins précises. Afin d'avoir une pré-configuration fonctionnelle à l'installation voici la configuration de Debconf que j'utilise.

Tout d'abord dans un terminal (console) lancer la commande en "root" :
# dpkg-reconfigure debconf

  1. 1) Mettre Dialogue
  2. 2) Mettre Basse


2) Installer les paquets :
# apt-get install dhcp3-server

Répondre aux questions

Voici mon /etc/dhcpd.conf
#dhcpd.conf - generated by drakTermServ

ddns-update-style ad-hoc;
ddns-updates on;
ddns-hostname = host-decl-name;

# Long leases (48 hours)
default-lease-time 172800;
max-lease-time 172800;

option domain-name "dom-sln.local";
option netbios-dd-server 10.1.1.1;
option netbios-name-servers 10.1.1.1;
option netbios-node-type 8;
option routers 10.1.1.1;

# Clef secret de dialogue entre dhcpd et named
key "rndc-key" {
algorithm hmac-md5;
secret "MACLEF";
};

# dom-sln.local
zone dom-sln.local. {
primary 127.0.0.1;
}

# REZ1
subnet 10.1.1.0 netmask 255.255.255.0 {
authoritative;
ddns-updates on;
#ddns-hostname = concat ("dhcp-hosts-SLN","-",binary-to-ascii(10,8,"-",leased-address));
#send host-name = concat ("dhcp-hosts-SLN","-",binary-to-ascii(10,8,"-",leased-address));
ddns-hostname = concat("dhcp-hosts-SLN","-",binary-to-ascii(10,8,"-",leased-address),"-",binary-to-ascii(16,8, "-", substring (hardware, 1, 6)));
send host-name = concat("dhcp-hosts-SLN","-",binary-to-ascii(10,8,"-",leased-address),"-",binary-to-ascii(16,8, "-", substring (hardware, 1, 6)));
option subnet-mask 255.255.255.0;
option broadcast-address 10.1.1.255;
option domain-name "dom-sln.local";
option netbios-name-servers 10.1.1.1;
option netbios-dd-server 10.1.1.1;
option netbios-node-type 8;
option routers 10.1.1.1;
next-server 10.5.1.1;
#range dynamic-bootp 10.1.1.100 10.1.1.254;
range 10.1.1.2 10.1.1.253;
option domain-name-servers 10.1.1.1, 82.67.59.175, 212.27.40.240;
ddns-hostname = host-decl-name;
#option wpad-curl code 252 = text;
#option wpad-curl "http://wpad.dom-sln.local/proxy.pac\000";


# debian
host debian {
allow unknown-clients;
ddns-rev-domainname "debian";
ddns-updates on;
hardware ethernet 00:11:09:B4:0F:B2;
fixed-address 10.1.1.254;
# send host-name = concat ("dhcp-hosts-SLN","-",binary-to-ascii(10,8,"-",leased-address));
option routers 10.1.1.1;
}

# satellite
host satellite {
allow client-updates;
ddns-rev-domainname "satellite";
ddns-updates on;
hardware ethernet 00:14:2a:3e:ee:cb;
fixed-address 10.1.1.253;
# send host-name = concat("dhcp-hosts-SLN","-",binary-to-ascii(10,8,"-",leased-address),"-",binary-to-ascii(16,8, "-", substring (hardware, 1, 6)));
option routers 10.1.1.1;
}

# chris
host superman {
allow unknown-clients;
ddns-rev-domainname "superman";
ddns-updates on;
hardware ethernet 00:1f:c6:cb:af:31;
fixed-address 10.1.1.252;
# send host-name = concat("dhcp-hosts-SLN","-",binary-to-ascii(10,8,"-",leased-address),"-",binary-to-ascii(16,8, "-", substring (hardware, 1, 6)));
option routers 10.1.1.1;
}

# debian2
host debian2 {
allow unknown-clients;
ddns-rev-domainname "debian2";
ddns-updates on;
hardware ethernet 00:30:1b:b6:3a:23;
fixed-address 10.1.1.251;
# send host-name = concat ("dhcp-hosts-SLN","-",binary-to-ascii(10,8,"-",leased-address));
option routers 10.1.1.1;
}

# win2003
host win2003 {
allow unknown-clients;
ddns-rev-domainname "win2003";
ddns-updates on;
hardware ethernet 08:00:27:7D:72:67;
fixed-address 10.1.1.250;
# send host-name = concat ("dhcp-hosts-SLN","-",binary-to-ascii(10,8,"-",leased-address));
option routers 10.1.1.1;
}

# winxp
host winxp {
allow unknown-clients;
ddns-rev-domainname "winxp";
ddns-updates on;
hardware ethernet 08:00:27:B3:8C:19;
fixed-address 10.1.1.249;
# send host-name = concat ("dhcp-hosts-SLN","-",binary-to-ascii(10,8,"-",leased-address));
option routers 10.1.1.1;
}

# actwin
host actwin {
allow unknown-clients;
ddns-rev-domainname "winxp";
ddns-updates on;
hardware ethernet 08:00:27:38:DA:9D;
fixed-address 10.1.1.248;
# send host-name = concat ("dhcp-hosts-SLN","-",binary-to-ascii(10,8,"-",leased-address));
option routers 10.1.1.1;
}

# win2003-2
host win2003-2 {
allow unknown-clients;
ddns-rev-domainname "win2003-2";
ddns-updates on;
hardware ethernet 08:00:27:AF:7F:DF;
fixed-address 10.1.1.247;
# send host-name = concat ("dhcp-hosts-SLN","-",binary-to-ascii(10,8,"-",leased-address));
option routers 10.1.1.1;
}

# mandriva
host mandriva {
allow unknown-clients;
ddns-rev-domainname "mandriva";
ddns-updates on;
hardware ethernet 08:00:27:EE:BF:70;
fixed-address 10.1.1.199;
# send host-name = concat ("dhcp-hosts-SLN","-",binary-to-ascii(10,8,"-",leased-address));
option routers 10.1.1.1;
}

}




3) Installer Bind9 (named)
# apt-get install bind9

....

Voici mon /var/lib/named/etc/named.conf

acl "local" {
82.67.59.175;
10.1.1.0/24;
10.3.1.0/24;
10.4.1.0/24;
10.5.1.0/24;
127.0.0.1/8;
};

acl "world" {
any;
};

options {
allow-query-cache { any; };
allow-query { any; };

/*
* If there is a firewall between you and nameservers you want
* to talk to, you might need to uncomment the query-source
* directive below. Previous versions of BIND always asked
* questions using port 53, but BIND 8.1 uses an unprivileged
* port by default.
*/
/*query-source address * port 53;*/
version "GNU !";
also-notify{
212.27.60.19;
212.27.60.20;
};
#pid-file "/var/lib/named/var/run/named.pid";
pid-file "/var/run/named.pid";

};

key "rndc-key" {
algorithm hmac-md5;
secret "MACLEF";
};

controls {
inet 127.0.0.1 port 953
allow { 127.0.0.1; } keys { "rndc-key"; };
};


#zone "system-linux.net" {
# type master;
# file "/var/named/master/system-linux.net.hosts";
# Comme named est chrooté dans /var/lib/named
# file "/var/named/master/system-linux.net.hosts" =
# file "/var/lib/master/var/named/master/system-linux.net.hosts" non chrooté
# notify yes;
# allow-update {
# local;
# key rndc-key;
# };
# };

zone "1.1.10.in-addr.arpa" {
type master;
file "/var/named/master/10.1.1.rev";
allow-update {
local;
key rndc-key;
};
};
zone "dom-sln.local" {
type master;
file "/var/named/master/dom-sln.local.hosts";
allow-update {
local;
key rndc-key;
};
};
zone "1.3.10.in-addr.arpa" {
type master;
file "/var/named/master/10.3.1.rev";
allow-update {
local;
key rndc-key;
};
};
zone "1.5.10.in-addr.arpa" {
type master;
file "/var/named/master/10.5.1.rev";
allow-update {
local;
key rndc-key;
};
};



Puis par exemple mon /var/named/master/dom-sln.local.hosts

$ttl 38400
dom-sln.local. IN SOA debian.dom-sln.local. lolo (
1213525733
10800
3600
604800
38400 )
TXT "v=spf1 a mx ptr mx:smtp.XXXXXXX ip4:10.0.0.0/8 ip4:127.0.0.0/8 ip4:IP -all"

dom-sln.local. IN NS debian.dom-sln.local.
helios.dom-sln.local. IN A 10.1.1.1
satellite.dom-sln.local. IN A 10.1.1.253
debian.dom-sln.local. IN A 10.1.1.254

superman.dom-sln.local. IN A 10.3.1.252
marion.dom-sln.local. IN A 10.3.1.253

win7.dom-sln.local. IN A 10.5.1.252
win2003.dom-sln.local. IN A 10.1.1.250
debian.dom-sln.local. IN A 10.1.1.254
win2003-2.dom-sln.local. IN A 10.1.1.251
winxp.dom-sln.local. IN A 10.1.1.249
dom-sln.local. IN LOC 45 46 0.000 N 4 50 0.000 E 248.00m 0.00m 10000m 10m
wpad.dom-sln.local. IN A 10.1.1.254


Et mon /var/named/master/10.1.1.rev

$ttl 38400
1.1.10.in-addr.arpa. IN SOA helios.XXXXXXXXXXXXXX. lolo (
1209869364
10800
3600
604800
38400 )
TXT "v=spf1 a mx ptr mx:smtp.XXXXXXXXXXXXXX ip4:10.0.0.0/8 ip4:127.0.0.0/8 ip4:IP -all"
1.1.10.in-addr.arpa. IN NS helios.XXXXXXXXXXXXXX.
1.1.1.10.in-addr.arpa. IN PTR helios.XXXXXXXXXXXXXX.

254.1.1.10.in-addr.arpa. IN PTR debian.dom-sln.local.
253.1.1.10.in-addr.arpa. IN PTR satellite.dom-sln.local.
251.1.1.10.in-addr.arpa. IN PTR win2003-2.dom-sln.local.
250.1.1.10.in-addr.arpa. IN PTR win2003.dom-sln.local.
251.1.1.10.in-addr.arpa. IN PTR win2003-2.dom-sln.local.
249.1.1.10.in-addr.arpa. IN PTR winxp.dom-sln.local.
254.1.1.10.in-addr.arpa. IN PTR wpad.dom-sln.local.
  • Commenter cette solution |
Score
0
òh
òi
|
Meilleure réponse sélectionnée par sam85.
  • Commenter cette réponse |
Score
0
òh
òi
|
ok .merci bien lolotux
  • Commenter cette réponse |
Score
0
òh
òi
|
Il est évident que ces fichiers n'ont pas été pondu comme cela, c'est un travail... long !
;) 
  • Commenter cette réponse |
Score
0
òh
òi
|
  • Commenter cette réponse |

Ce n'est pas ce que vous cherchiez ?

Tom's guide dans le monde
  • Allemagne
  • Italie
  • Irlande
  • Royaume Uni
  • Etats Unis
Suivre Tom's Guide
Inscrivez-vous à la Newsletter
  • ajouter à twitter
  • ajouter à facebook
  • ajouter un flux RSS