This is an old revision of the document!
Participants should be able to configure primary and secondary name server for a given domain name and do a zone transfer between them. This should include creating, modifying, deleting RRs and incrementing Primary name server serial number. Each participant name servers should be visible from other name servers since we will use the lab root and GTLD server. A custom lab root hint will be used.
Note: Configure your VM to be the primary (also called master) of your own domain and also a slave for VMs in your right side. VM in your left will act as slave for your own domain.
/etc/bind
mkdir -p /etc/bind/master
$TTL 1d @ SOA ns.groupXX.net. email.groupXX.net. ( 2016010101 ;serial no. 30m ;refresh 15m ;retry 1d ;expire 30m ;negative cache ttl ) IN NS ns.groupXX.net. ns IN A 192.168.30.X www IN A 192.168.30.X mail01 IN A 192.168.1XX.200 mail02 IN A 192.168.1XX.201 groupXX.net. MX 10 mail01.groupXX.net. groupXX.net. MX 20 mail02.groupXX.net. groupXX.net. IN TXT "groupXX Authoritative DNS Server"
/etc/bind/named.conf.local
). Please note that the primary zone is of “type master” while a secondary zone is of “type slave.” Specify your nameserver’s working directory.zone "groupXX.net" { type master; file "/etc/bind/master/db.groupXX.net"; };
systemctl reload named systemctl status named
dig
. To test your name server to display the SOA records for your domain. dig @192.168.30.XX groupXX.net SOA
To test your name server to display NS records
dig @192.168.30.XX groupXX.net NS
To test your name server to display other resource records (A, MX, or TXT). You can also use the -t
option to set the query type.
dig @192.168.30.XX ns.groupXX.net A
dig -t MX @192.168.30.XX groupXX.net
mkdir -p /etc/bind/slave
named.conf.local
add the following (group98.net is the neighbour zone):\\zone "groupYY.net" { type slave; file "/var/named/slave/db.groupYY.net"; masters { 192.168.30.YY; }; };
dig @localhost groupYY.net AXFR
If successful, you will see all the resource records as an output.
named.conf.local
for the zones where you are primary:zone "groupXX.net" { type master; file "/etc/named/master/db.groupXX.net"; allow-transfer { 192.168.30.YY; }; };
Execute the same dig command again. If successful, the status in the dig output should say Transfer Failed.
$TTL 1d @ SOA ns.groupXX.net. email.groupXX.net. ( 2016010101 ;serial no. <config sniff...........> IN NS ns.groupXX.net. IN NS ns.groupYY.net. <config sniff..........>