This is an old revision of the document!
Docker - DNS Server
What Is DNS and How Does It Work – A Comprehensive Guide I propose to create a Docker Bind9 Image using base Docker Alpine Linux images, with S6 init system.
The main router must be set to forward packets!
The ability to forward packets must be set / allowed, edit or add the following parameters in sudo vim /etc/sysctl.conf:
- net.ipv4.ip_forward = 1
- net.ipv4.conf.all.proxy_arp = 1
sudo sysctl net.ipv6.conf.all.forwarding=1similar for ipv6
After applying these changes reboot or apply setting using sudo sysctl -p /etc/sysctl.conf
/usr/sbin/named -f -4to start the isc-bind9 application called named,-fto run in foreground-4to run ipv4 only
rndc stopto stop named - need to implement this in S6rndc reloadto reload the named configuration filesnamed-checkconf /etc/bind/named.confnamed-checkzone kptree.net /etc/bind/db.kptree.netnamed-checkzone 1.168.192.in-addr.arpa /etc/bind/db.1.168.192cat /log/named/bind.logto list bind log file-
rndc dumpdb -zonescat /var/bind/named_dump.dbto see the database dumpnamed-checkconf -ldoes this option still exist?named-checkconf -pfor a flatened uncomment listing of the configuration files
References
References
- KPTree.net's bare metal implementation of dns - dhcp, based upon ISC Bind9 and DHCP on Debian 10 (was originally Ubuntu).