Open main menu

CDOT Wiki β

Changes

OPS335 DNS Lab

111 bytes added, 16:19, 5 September 2011
Edit /etc/named.conf
};
zone "localhost" { type master; file "localhost.zone"; };
zone "X.168.192.in-addr.arpa" { type master; file "mydb-for-192-168-X"; };
zone "example.org" { type master; file "mydb-for-example-dot-org"; };
*Make a new directory called 'named', like this
mkdir /var/lib/named
*Now edit /var/lib/named/localhost.zone and enter the following: $TTL 604800 @ IN SOA localhost. root.localhost. ( 1 ; Serial 604800 ; Refresh 86400 ; Retry 2419200 ; Expire 604800 ); Negative Cache TTL ; @ IN NS localhost. @ IN A 127.0.0.1
*Now edit /var/lib/named/mydb-for-example-dot-org and enter the following: But use your own X value where applicable.
$TTL 604800 @ IN SOA localhost. root.localhost. ( 1 ; Serial 604800 ; Refresh 86400 ; Retry 2419200 ; Expire 604800 ); Negative Cache TTL ; @ IN NS localhost. f13 IN A 192.168.X.1 vm01 IN A 192.168.X.2 vm02 IN A 192.168.X.3 vm03 IN A 192.168.X.4
*Next, edit /var/lib/named/mydb-for-192-168-X and enter the following:
$TTL 604800 @ IN SOA localhost. root.localhost. ( 1 ; Serial 604800 ; Refresh 86400 ; Retry 2419200 ; Expire 604800 ); Negative Cache TTL ; @ IN NS localhost. 1 IN PTR f13.example.org 2 IN PTR vm01.example.org 3 IN PTR vm02.example.org 4 IN PTR vm03.example.org
*Now set up your resolver to point to itself. Edit /etc/resolv.conf, delete what's there and enter this data instead. Remember to use your value for X.
nameserver 192.168.X.1 domain example.org
*Start your DNS server with the command service named start
*Check that your name server is running  ps ax | grep named *or service named status
When starting or restarting your name server view the log file (/var/log/messages) to ensure it started without error.
1
edit