Step by Step Configuration of DNS Server

Published on February 2017 | Categories: Documents | Downloads: 40 | Comments: 0 | Views: 268
of 5
Download PDF   Embed   Report

Comments

Content

Step By Step configuration of DNS server December 28, 2010 Posted by Wagema Samuel under Linux Note:- Before Start Set ip-address manually (I use 172.17.0.250) Set hostname FQDN (I use server.pdc.home) No need to install caching-nameserver if you are using fedora 9 to 14. The Installation has been performed on the following Linux OS. Server: Fedora 6 to 14, rhel 5.0, to 5.5 & Centos 5.0, to 5.5. Note: Please be careful about the firewall and selinux policies before continuing with the configuration. Disable the Firewall &Selinux or create rules. 1. Installation of DNS Server. view source print? 1 [root@linux8 ~]# yum install bind* caching-nameserver* 2.Make sure that the host names are set properly view source print? 1 [root@linux8 ~]# vi /etc/hosts 127.0.0.1 localhost.localdomainlocalhost ::1 localhost6.localdomain6 localhost6 172.17.0.250 server.pdc.home server #(ip address &fqdn) view source print? 1 [root@linux8 ~]# vi /etc/sysconfig/network NETWORKING=yes NETWORKING_IPV6=no HOSTNAME=server.pdc.home view source print?

1

[root@linux8 ~]# hostname server.pdc.home

3. DNS resolve entry view source print? 1 [root@linux8 ~]# vi /etc/resolv.conf searchserver.pdc.home nameserver 172.17.0.250 4. Do the following configuration to setup DNS properly. (a) view source print? 1 [root@linux8 ~]# vi /etc/named.conf options { 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”; query-source port 53; }; zone “pdc.home” IN { type master; file “pdc.home.forward”; allow-update { none; }; }; zone “0.17.172.in-addr.arpa” IN { type master; file “pdc.home.reverse”; allow-update { none; }; }; (b) Create the zone file in the proper location and also create a reverse zone file. view source print? 1 [root@linux8 ~]# cd /var/named

2 3 4

[root@linux8 ~]#cplocalhost.zonepdc.home.forward [root@linux8 ~]#cpnamed.localpdc.home.reverse [root@linux8 ~]# vi pdc.home.forward

$TTL 86400 @ IN SOA server.pdc.home. root.server.pdc.home. ( 42 ; serial (d. adams) 3H ; refresh 15M ; retry 1W ; expiry 1D ) ; minimum IN NS server.pdc.home. IN A 127.0.0.1 server IN A 172.17.0.250 view source print? 1 [root@linux8 ~]# vi pdc.home.reverse $TTL 86400 @ IN SOA server.pdc.home. root.server.pdc.home. ( 1997022700 ; Serial 28800 ; Refresh 14400 ; Retry 3600000 ; Expire 86400 ) ; Minimum IN NS server.pdc.home. 250 IN PTR server.pdc.home. (c) Restart the named service view source print? 1 [root@linux8 ~]# service named restart 2 [root@linux8 ~]#chkconfig named on #for permanent service on 3 [root@linux8 ~]# bind-chroot-admin -d 4 [root@linux8 ~]# bind-chroot-admin -e #for binding with chroot Security The DNS Server is ready now, it’s time to test.

view source print? 1 [root@linux8 ~]# dig server.pdc.home Answer Should look like below: ; <>DiG 9.3.4-P1 <>server.pdc.home ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 33213 ;; flags: qraardra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0 ;; QUESTION SECTION: ;server.pdc.home. IN A ;; ANSWER SECTION: server.pdc.home. 86400 IN A 172.17.0.250 ;; AUTHORITY SECTION: pdc.home. 86400 IN NS server.pdc.home. ;; Query time: 0 msec ;; SERVER: 172.17.0.250#53(172.17.0.250) ;; WHEN: Mon Mar 9 13:39:47 2009 ;; MSG SIZE rcvd: 63 view source print? 1 [root@linux8 ~]# dig -x 172.17.0.250 Answer Should look like below: ; <>DiG 9.3.4-P1 <> -x 172.17.0.250 ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 34497 ;; flags: qraardra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1 ;; QUESTION SECTION:

;250.0.17.172.in-addr.arpa. IN PTR ;; ANSWER SECTION: 250.0.17.172.in-addr.arpa. 86400 IN PTR server.pdc.home. ;; AUTHORITY SECTION: 0.17.172.in-addr.arpa. 86400 IN NS server.pdc.home. ;; ADDITIONAL SECTION: server.pdc.home. 86400 IN A 172.17.0.250 ;; Query time: 0 msec ;; SERVER: 172.17.0.250#53(172.17.0.250) ;; WHEN: Mon Mar 9 13:41:37 2009 ;; MSG SIZE rcvd: 103

Sponsor Documents

Or use your account on DocShare.tips

Hide

Forgot your password?

Or register your new account on DocShare.tips

Hide

Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in

Close