I installed bind9 on my Ubuntu server 17.04 TLS in my VirtualBox oracle VM, then I configured the different configuration files of the DNS server
/etc/bind/named.conf.local
:
zone "exemple.com" IN {
type master;
file "/etc/bind/db.exemple.com";
}
/etc/bind/db.exemple.com
:
$TTL 86400 ; une journee
@ IN SOA ns1.exemple.com. root.exemple.com. (
2018031300 ; serial YYYYMMDDNN
43200 ; Refresh 12 heure
3600 ; Retry dans une heure
604800; Expire dans une semaine
800 ; Negative cache TTL
);
@ IN NS ns1.exemple.com.
ns1 IN A 192.168.0.3
www IN A 192.168.0.3
exemple.com. IN A 192.168.0.3
/etc/resolv.conf
:
nameservers 192.168.0.3
search exemple.com
/etc/hosts
:
192.168.0.3 ns1 exemple.com
When I restart bind9 with /etc/init.d/bind9 restart
it works.
And then when try with nslookup ns1.exemple.com
, the output is
connection time out; no server could be reached
I try the command service bind9 reload
to see if the service is really runnning and the output is
cannot reload because bind is not active
so please help me to solve this problem.