Error starting up dns forward zone file

I am working setting up my DNS, but i am getting errors in: tail -f /var/sys/log. I have setted up a static ip-adress in networks: 192.168.10.1

May 11 18:13:54 s180368 named[3582]: command channel listening on ::1#953
May 11 18:13:54 s180368 named[3582]: managed-keys-zone: loaded serial 2
May 11 18:13:54 s180368 named[3582]: zone loaded serial 1
May 11 18:13:54 s180368 named[3582]: zone loaded serial 1
May 11 18:13:54 s180368 named[3582]: zone has no NS records
May 11 18:13:54 s180368 named[3582]: zone not loaded due to errors.
May 11 18:13:54 s180368 named[3582]: zone localhost/IN: loaded serial 2
May 11 18:13:54 s180368 named[3582]: zone loaded serial 1
May 11 18:13:54 s180368 named[3582]: all zones loaded
May 11 18:13:54 s180368 named[3582]: running

This is my forward zone file (db.s180368.com):

;
$TTL 604800
@ IN SOA ns.s180368.com. root.s180368.com. ( 2 ; Serial 604800 ; Refresh 86400 ; Retry 2419200 ; Expire 604800 ) ; Negative Cache TTL
;
ns IN NS 192.168.10.1
@ IN A 127.0.0.1

Named.conf.local:

#FORWARD LOOKUP ZONE
zone "s180368.com" { type master; file "/etc/bind/db.s180368.com";
};

/etc/hosts:

127.0.0.1 localhost
127.0.1.1 server
192.168.10.1 s180368.com s180368
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

/etc/resolv.conf

nameserver 127.0.0.1
search s180368.com

1 Answer

These two lines are the problem:

s180368. IN NS 192.168.10.1
s180368. IN A 127.0.0.1

The dot on the end of the name makes it into a fully qualified domain name rather than just a hostname under the zone. In essence bind thinks you're trying to include information about a full domain name called s180368 (without .com) which is not inside the zone s180368.com.

You probably wanted something more like:

ns IN NS 192.168.10.1
@ IN A 127.0.0.1

@ is a shortcut for the full zone name in this case s180368.com. You're already using it for the SOA record above it.

Note: the registrar may require two different nameserver addresses in which case you should have an ns1 and ns2 and have these names and IP addresses (for glue) match the ones you give the registrar. Your registrar may also attempt to verify that your nameservers are set up correctly especially when using glue records, and if so, will fail because the nameservers are local IPs that are only relevant on your local network (only resolvers within your local network would successfully resolve the hostname).

4

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like