Posted by: mahinctg | September 16, 2009

DNS Configuration in CentOS 5

Configuring a DNS in CentOS 5 in a Bit Different then Doing it in Fedora Core 3, which was my primary OS for my servers till now. But due to compatibility and Update Issue I’m moving to CentOS. Currently Using CentOS 5.3

I’m assuming that you have Installed DNS server at the time of Installing the Server. Now first just find the sample files that are inside a Dir like this Location “/usr/share/doc/bind-9.3.4/sample/” (May Difffer as per u r bind version) and copy those files in the related /var/named/chroot/etc/ and /var/named/chroot/var/named Dir and also make a link with this command “ln -s /var/named/chroot/etc/named.conf /etc/named.conf”.  Now Edit the named.conf file. sample.named.conf.

You have to generate a Key to use Inside the named.conf file inside the ” ” in the secret option. Use this to generate the key “/usr/sbin/dns-keygen” and copy the key and paste it in named.conf under “ddns_key” -> secret ” “.

Now create the zone file under /var/named/chroot/var/named with the file name you declared in named.conf and save it. linuxcourse.com Now start up Named service and chk /var/log/messages for any error. If you have done it properly your Zones are now loaded and you can chk with the dig command but remember you should have your DNS server’s IP in /etc/resolve.conf as the first one to resolve it Via your DNS.

Now also make sure that Named service will run at startup “chkconfig –level 345 named on”.


Responses

  1. Mahin bai great article thanks realy help full for me


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Categories

Follow

Get every new post delivered to your Inbox.