I am currently trying to build my own home lab for the first time, and as a newbie it’s been a bit confusing. For the past few days, I have been working on configuring an internal DNS server, and after setting it up I run the following tests:
First I try to check if my DNS will resolve, and direct me to the IP address of my web server (as root):
nslookup www.wallynet.local
Output:
Server: 192.168.1.3
Address: 192.168.1.3#53
Name: www.wallynet.local
Address: 192.168.1.2
Next, I tried to see if my DNS will resolve in reverse, and also direct me to my web server (as root):
nslookup -x www.wallynet.local
Output:
*** Invalid option: x
Server: 192.168.1.3
Address: 192.168.1.3#53
Name: www.wallynet.local
Address: 192.168.1.2
I am getting the right IP addresses as far as I know.
However, according to a source I have been following as I am setting up my DNS, I should check my zone files by running the following zone check command on my forward zone file (which I get the result I should), as root:
named-checkzone wallynet.local /var/named/fwd.wallynet.local
Output:
zone wallynet.local/IN: loaded serial 2011071001
OK
However if I run the same command for my reverse zone file (which I get errors):
named-checkzone wallynet.local /var/named/reverse.wallynet.local
Output:
zone wallynet.local/IN: NS 'primary.wallynet.local' has no address records (A or AAAA)
zone wallynet.local/IN: not loaded due to errors.
This is my reverse zone file as it currently stands (please disregard the many commented out lines. I just pasted it from the source I am referring to for this task):
$TTL 86400
@ IN SOA primary.wallynet.local. root.wallynet.local. (
2011071001 ;Serial
3600 ;Refresh
1800 ;Retry
604800 ;Expire
86400 ;Minimum TTL
)
;NAME SERVER INFORMATION
@ IN NS primary.wallynet.local.
;RECORD IP ADDRESS TO HOSTNAME
3 IN PTR primary.wallynet.local.
;WHAT IS BELOW IS COMMENTED OUT FOR NOW (CAME FROM A RESOURCE ONLINE)
;@ IN NS masterdns.unixmen.local.
;@ IN NS secondarydns.unixmen.local.
;@ IN A 192.168.1.101
;@ IN A 192.168.1.102
;@ IN A 192.168.1.103
;masterdns IN A 192.168.1.101
;secondarydns IN A 192.168.1.102
;client IN A 192.168.1.103
Why am I not getting an error for this command if supposedly my nslookup command is giving me the right results?
Update: this is my current forward file:
$TTL 86400
@ IN SOA primary.wallynet.local. root.wallynet.local. (
2011071001 ;Serial
3600 ;Refresh
1800 ;Retry
604800 ;Expire
86400 ;Minimum TTL
)
;NAME SERVER INFORMATION
@ IN NS primary.wallynet.local.
;RECORD HOSTNAME TO IP ADDRESS
primary IN A 192.168.1.3
@ IN A 192.168.1.3
;WHAT IS BELOW IS COMMENTED OUT FOR NOW (CAME FROM A RESOURCE ONLINE)
;@ IN NS masterdns.unixmen.local.
;@ IN NS secondarydns.unixmen.local.
;@ IN A 192.168.1.101
;@ IN A 192.168.1.102
;@ IN A 192.168.1.103
;masterdns IN A 192.168.1.101
;secondarydns IN A 192.168.1.102
;client IN A 192.168.1.103
;HERE I AM DEFINING A CNAME
www IN A 192.168.1.2
Update: this is my zone configurations in my named.conf that i have added:
zone "wallynet.local" IN {
type master;
file "/var/named/fwd.wallynet.local";
allow-update { none; };
};
zone "1.168.192.in-addr.arpa" IN {
type master;
file "/var/named/reverse.wallynet.local";
allow-update { none; };
};