You are on page 1of 2

################How to Configure DNS Server####################### ~]# yum install bind* ~]# cp -p /etc/named.* /var/named/chroot/etc/ ~]# rm -f /etc/named.* ~]# cp -p /var/named/named.

* /var/named/chroot/var/named/ ~]# rm -f /var/named/named.* ~]# cd /var/named/chroot/etc/ ~]# vim named.conf // // named.conf // // Provided by Red Hat bind package to configure the ISC BIND named(8) DNS // server as a caching only nameserver (as a localhost DNS resolver only). // // See /usr/share/doc/bind*/sample/ for example named configuration files. // options { listen-on port 53 { 127.0.0.1; 192.168.0.18; }; directory "/var/named"; dump-file "/var/named/data/cache_dump.db"; statistics-file "/var/named/data/named_stats.txt"; memstatistics-file "/var/named/data/named_mem_stats.txt"; allow-query { localhost; any; }; recursion yes; dnssec-enable yes; dnssec-validation yes; dnssec-lookaside auto; /* Path to ISC DLV key */ bindkeys-file "/etc/named.iscdlv.key"; }; logging { channel default_debug { file "data/named.run"; }; }; zone "." IN { type hint; file "named.ca"; }; zone "example.com" IN { type master; file "sonam"; (Change the domain here according to your domain)) (Change your forward zone file name as you wish)

allow-update { none; }; }; zone "0.168.192.in-addr.arpa" IN { (Change the Network ID according to your Network) type master; file "tashi"; (Change your reverse zone file name as you wish) allow-update { none; }; }; ~]# cd /var/named/chroot/var/named ~]# cp -p named.localhost sonam ~]# cp -p named.empty tashi ~]# vim sonam $TTL 1D @ IN SOA desktop18.example.com. root.desktop18.example.com. ( 0 ; serial 1D ; refresh 1H ; retry 1W ; expire 3H ) ; minimum NS desktop18.example.com. desktop18 A 192.168.0.18 ~]# vim tashi $TTL 3H @ IN SOA desktop18.example.com. root.desktop18.example.com. ( 0 ; serial 1D ; refresh 1H ; retry 1W ; expire 3H ) ; minimum NS desktop18.example.com. 18 PTR desktop18. ~]# /etc/init.d/named restart ~]# nslookup desktop18.example.com (it is your FQDN) ~]# dig desktop18.example.com (FQDN) ~]# dig -x 192.168.0.18

You might also like