Pages

Master & Slave DNS Server Setup in Linux

Scenario:We have a DNS domain "homedomain.com". With master server as homeserver.homedomain.com, with an IP (192.168.1.200). And a slave for this domain as ns2.homedomain.com , with an IP (192.168.1.10).

Master :========
1) /etc/named.conf
options { directory "/var/named"; dump-file "/var/named/data/cache_dump.db"; statistics-file "/var/named/data/named_stats.txt";
// line below is important to tell slaves about any changes. notify yes;};
controls { inet 127.0.0.1 allow { localhost; } keys { rndckey; };};
//[Various zones skipped ...]
zone "homedomain.com" IN { type master; file "homedomain.com.fwd"; allow-update { none; }; allow-transfer {192.168.1.10;};};
zone "1.168.192.in-addr.arpa" IN { type master; file "homedomain.com.rev"; allow-update { none; }; allow-transfer {192.168.1.10;};};
include "/etc/rndc.key";

2) /var/named/chroot/var/named/homedomain.com.fwd$TTL 86400$ORIGIN homedomain.com.@ IN SOA homeserver.homedomain.com. mkazeem.isb.paknet.com.pk. ( 6 ; serial (d. adams) 3H ; refresh 15M ; retry 1W ; expiry 1D ) ; minimum
; Note: All master and slave name servers must be mentioned in this zone,; else the "master changed" notifies will NOT reach slave servers !@ IN NS homeserver.homedomain.com.@ IN NS ns2.homedomain.com.
;IPs of our name servers :-homeserver.homedomain.com. IN A 192.168.1.200ns2.homedomain.com. IN A 192.168.1.10
; Normal hosts below this line:-www.homedomain.com. IN A 192.168.1.200
3) /var/named/chroot/var/named/homedomain.com.rev$TTL 86400$ORIGIN 1.168.192.in-addr.arpa.@ IN SOA homeserver.homedomain.com. mkazeem.isb.paknet.com.pk. ( 5 ; serial (d. adams) 3H ; refresh 15M ; retry 1W ; expiry 1D ) ; minimum
@ IN NS homeserver.homedomain.com.@ IN NS ns2.homedomain.com.200.1.168.192.in-addr.arpa. IN PTR homeserver.homedomain.com.10.1.168.192.in-addr.arpa. IN PTR ns2.homedomain.com.
200.1.168.192.in-addr.arpa. IN PTR www.homedomain.com.


Slave :=======
1) /etc/named.conf
//// named.conf for Red Hat caching-nameserver//
options { directory "/var/named"; dump-file "/var/named/data/cache_dump.db"; statistics-file "/var/named/data/named_stats.txt"; /* * If there is a firewall between you and nameservers you want * to talk to, you might need to uncomment the query-source * directive below. Previous versions of BIND always asked * questions using port 53, but BIND 8.1 uses an unprivileged * port by default. */ // query-source address * port 53;};
//// a caching only nameserver config//controls { inet 127.0.0.1 allow { localhost; } keys { rndckey; };};
//[Zones skipped ...]
zone "homedomain.com" IN { type slave; file "slaves/homedomain.com.fwd"; masters {192.168.1.200;};};
zone "1.168.192.in-addr.arpa" IN { type slave; file "slaves/homedomain.com.rev"; masters {192.168.1.200;};};
include "/etc/rndc.key";
<<<<<<>>>>>>>

Forex Trading