Wednesday, March 19, 2008

Linux DNS setup

Steps to follow to configure DNS:
1. Install bind packages and caching packages.
#rpm -ivh bind*
#rpm -ivh caching*
2. open /etc will find two files:
named.caching-nameserver.conf, /etc# ls -l named.*
3. open the first file in VI editor
# vi named.caching-nameserver.conf
at line 15 add the IP addres of your DNS server
at line 23 allow-query
{local host;;}
at line 32 match-client
{local host;;}
Note : i am using as an example network.
save the file
4. open the second file in VI editor
# vi
copy the lines from line 21 to line 25 and paste at the end. Edit the lines as follows :
zone "" {
type master;
allow-update {none};
save the file
5. Now go to /var/named/chroot/var/named
6. copy the file and name it as xxx.for# cp xxx.for
7. Open the file xxx.forand add following lines in the end.
sys1 IN A
sys2 IN A
save the file
8. #vi /etc/resolv.conf
Note : ip address of the machine you are configuring as DNS server.
9. now start the service
#service named restart
enter the name and u should get the ip address as reply

No comments: