Sunday, February 06, 2005

Configuring Dynamic DNS in Redhat Linux 8/9 OR A small How-to on DDNS

Hey to All on a Lazy Sunday AfterNoon,

Just before i hit out on the roads with my friends , lemme write something useful and as i promised last time i would be writting on Dynamic DNS services and it is very easy to configure as easy as it is on Windows Server.

WIth the Dynamic DNS service you can update the name for windows clients ... and the advantages are many fold.

Starting below is how you do it :

Step 1 :

First make sure you have the necessary RPMs installed:

# rpm -qa egrep "^bind^dhcp"

Which should show you have the following three RPMs installed:

dhcp-x.x.x
bind-utils-9.x.x
bind-9.x.x

Step 2 :

If you Dunn have the above packages no sweat . It is not very difficult to install them.

  • Get them from the Redhat 8/9 CD's from which you did the installation

  • If you have apt/yum installed use it as :
    #apt-get install bind and so on for the other packages


The other and more tedious way to be do it from the source or download an RPM and do a
#rpm -ivh <>

Step 3 :

Assuming that you have dhcpd and bind installed properly lets go on with the configration reqd and i am assuming the name of the domain that i am making as MyOffice.com and IP block as 192.168.0.0 /16

Starting with dhcp server here is the part of /etc/dhcpd.conf that needs to be tweaked.

# Turn on Dynamic DNS:
ddns-update-style interim;
ddns-updates on;

# Don't allow clients to update DNS, make the server do it
# based on the hostname passed by the DHCP client:
deny client-updates;
allow unknown-clients;

# Configure the client's DNS settings:
option domain-name "MyOffice.com";
option domain-name-servers 192.168.0.10;


Starting with dhcp server here is the part of /etc/named.conf that needs to be tweaked.

zone "MyOffice.com" in {
type master;
file "MyOffice.com.zone";
allow-update { localhost; };
};

zone "0.168.192.in-addr.arpa" IN {
type master;
file "192.168.0.rev";
allow-update { localhost; };
};

include "/etc/rndc.key";

Step 4 :

Generate a sha1 MD5 key on the localhost for rdnc to work.

Below is how will you put the key :

key "rndckey" {
algorithm hmac-md5;
secret "loFiocFzppGDq0OuFGDTFbSLNKpYjwjlhOZrkBVlNEozEIerNWDhcjeNOtZe";
};


Step 5 :

This needs to be added to the file /var/MyOffice.com.zone for the DDNS updates to be done :

; This file will be automatically updated when a DHCP assigns an address
$TTL 600 ; 10 minutes


This needs to be added to the file /var/192.168.0.rev for the DDNS updates to be done :

; This file will be automatically updated when DHCP issues an address
$TTL 600 ; 10 minutes


These lines are to be put at the end of the respective files as mentioned.

Step 6 :

Last but not the least reload the DNS and the DHCP server and also what i assumed in the above config is that the DNS and the DHCP server are on the same machine. If not you need to tweak the /etc/named.conf and /etc/rdnc.conf to get it working. Feel free to Message me in case you need to know more on it.

Now i am off to Coffee though a lill early :D

Till Then Take Care
Nitin

3 Comments:

At 3/17/2006 08:00:00 PM, Anonymous Anonymous said...

Have you ever set up rev-DDNS for CIDR non-RFC1918 network.

My ISP can delegate NS per IP or CNAME style, but DHCP wants to only register at the "class C" in-addr.arpa zone.

Grateful for any tips on this.

vortex

 
At 10/01/2010 12:15:00 AM, Blogger Unknown said...

Leather Jackets

Leather Coats

Leather Biker Jacket

Leather Bombers Jackets

Leather Skirt

Leather Blazer

 
At 7/07/2011 10:23:00 PM, Anonymous Organic vitamins said...

I agree that handwriting can say a great deal about a person. I think that men whose handwriting in incomprehensible care only about themselves and do not value others' opinions.

 

Post a Comment

<< Home