Sunday, November 3, 2019

domain name system - DNS Server using bind on CentOS - does not resolve

I am trying to setup a DNS for a standard lan zone.
I have now read every bit of info available but still the DNS server does not resolve
with nslookup or dig

e.g. "nslookup router.local.lan"
=> ** server can't find router.local.lan: NXDOMAIN



named.conf file:



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";


// Forward any unresolved requests to DNS of ISP
allow-recursion {
localhost;
192.168.1.0/24;
};
forwarders {
217.237.151.51;
};
};


zone "local.lan" {
type master;
file "lan.zone";
notify yes;
};


lan.zone File




$TTL 3600
@ IN SOA romeo0.local.lan. admin.local.lan. (
2013061001 ; Serial
3H ; refresh after 3 hours
1H ; retry after 1 hour
1W ; expire after 1 week
1D) ; minimum TTL of 1 day
@ IN NS romeo0.
@ IN A 192.168.1.160
router IN A 192.168.1.1

romeo1 IN A 192.168.1.161


Can someone help me finding the mistake I am making?
Any help is much appreciated.



Edit:
I found the solution:
I the DNS server in resolve.conf was wrong
And I needed to remove the dot as yoonix pointed out

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...