I'm trying to build my own dynamic DNS server on my private online instance.
I started by installing the DNS server BIND9 on your Debian/Ubuntu server via:
apt-get update && apt-get install bind9.
added my zone in the /etc/bind/named.conf.local:
include "/etc/bind/ddns-keys.conf";
zone "d.example.com" IN {
type master;
file "/var/lib/bind/db.d.example.com";
update-policy {
grant *.d.example.com. self d.example.com. A AAAA TXT;
};
notify no;
};
I created my key with in /etc/bind/ddns-keys.conf:
dnssec-keygen -a HMAC-SHA512 -b 512 -n HOST sb.d.example.com.
added the db file for my zone /var/lib/bind/db.d.example.com:
$ORIGIN .
$TTL 10 ; 10 seconds
d.example.com. IN SOA ns1.d.example.com. hostmaster.example.com. (
2014080101 ; serial
120 ; refresh (2 minutes)
120 ; retry (2 minutes)
2419200 ; expire(4 weeks)
120 ; minimum (2 minutes)
)
NS ns1.d.example.com.
NS ns2.d.example.com.
$ORIGIN d.example.com.
$TTL 30 ; 30 seconds
ipv4 A 38.68.84.19
ipv4v6 A 38.68.84.19
AAAA 2001:0db8::2
ipv6 AAAA 2001:0db8::2
ns1 A 38.68.84.19
ns2 AAAA 2001:0db8::2
I also checked and reloaded the conf:
named-checkconf
named-checkzone d.example.com /var/lib/bind/db.d.example.com
/etc/init.d/bind9 reload
But the subdomains are not resolved.
Any idea help is very appreciated.