[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Problème DHCP / DNS dynamique



On Sun, Mar 05, 2006 at 06:09:33PM +0100, bcyril@worldonline.fr wrote :
> Bonsoir à tous,
> J'essaye sans suucès depuis vendredi de configurer un
> serveur DNS que mon serveur DHCP mettrait à jour
> dynamiquement. Le serveur DNS fonctionne correctement tout
> comme le serveur DCHP mais ce dernier ne met pas à jour mon
> serveur DNS. Dans le fichier /var/log/syslog, j'ai le
> message suivant:
> Mar  5 17:57:03 test dhcpd: Unable to add forward map from
> toto.test.local to 192.168.1.198: not a zone
> 
> Du point de vue configuration, j'ai rajouter dans ma
> définition de zone DNS:
>  allow-update { 192.168.1.2; };
> 
> et pour le dhcp, j'ai ajouté:
> ddns-update-style interim;
> et:
> ddns-domainname "test.local";
> 
> Queqlqu'un verait-il ce que j'ai oublié où ce que j'ai mal
> fait....
> 
> 

Voici la procédure à suivre pour debian (testé en testing ;)


apt-get install dhcp3-server bind9
chmod 600 /etc/bind/rndc.key

### /etc/dhcp3/dhcpd.conf ###

# Instructions pour la mise à jour des zones
include "/etc/bind/rndc.key";

ddns-update-style interim;
deny client-updates;
ddns-updates on;
ddns-domainname "bigorneau.local";
ddns-rev-domainname "in-addr.arpa";
authoritative;

subnet 192.168.212.0 netmask 255.255.255.0 {
  option broadcast-address  192.168.212.255;
  option routers 192.168.212.1;
  option domain-name "bigorneau.local"; 
  option domain-name-servers 192.168.212.1;
  option broadcast-address  192.168.212.255;
  option routers 192.168.212.1;
  range 192.168.212.100 192.168.212.195;
  default-lease-time 600;
  max-lease-time 7200;
}

zone bigorneau.local {
  primary 192.168.212.1;
  key rndc-key;
}

zone 212.168.192.in-addr.arpa {
  primary 192.168.212.1;
  key rndc-key;
  }

######################################

### /etc/bind/named.conf.options
ajouter :

include "/etc/bind/rndc.key";

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

};

######################################

### /etc/bind/named.conf.local
//
// Do any local configuration here
//

// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";

zone bigorneau.local {
	type master;
	file "/etc/bind/db.bigorneau.local";
	allow-update { key rndc-key; };
	notify yes;
};

zone 212.168.192.in-addr.arpa {
	type master;
	file "/etc/bind/db.212.168.192";
	allow-update { key rndc-key; };
	notify yes;
};

#####################################

/etc/init.d/bind9 restart
/etc/init.d/dhcp3-server restart


Sur les clients :

#### /etc/dhclient.conf

send host-name "nom_d_hote";
#reject 192.168.4.1  ## rejeter les offres de certains serveurs

### THE END ###

A modifier selon la configuration réseau.
J'espère que ça aidera :)

Rémi Demarthe



Reply to: