-
Notifications
You must be signed in to change notification settings - Fork 6
DNS setup
Benedikt Kristinsson edited this page Feb 16, 2015
·
14 revisions
The old djbdns setup is bein replaced with a BIND based system.
The key points (and differences to the former system) are as follows
- Server names:
dns0.lokun.isanddns1.lokun.is. - DNS servers both serve as DNS caches to VPN clients and as resolvers for the
lokun.isdomain - The resolver is dynamically updated with info from record. Currently via the REST api, but there have been experiments with using ZeroMQ.
- Zones such as
netflix.comare being overridden and directed through a US based proxy
-
Install from apt and pip
# sudo apt-get install bind9 python-pip python-dev # pip install requests -
Get the
updatebind.pyscript fromlokun(private) repo and store in/srv/dns, also includeconfig.pyand fill out accordingly -
Create the zone file and
named.conf.options# python /srv/dns/updatebind --update-zone --update-named-conf-options # /etc/init.d/bind9 restart -
Copy the override zone file
/etc/bind/db.overidefromlokunrepo.There are on secrets to this, see Tunlr-Clone if you want your own.
-
Copy
/etc/bind/named.conf.localfrom the same repo. Maps domains to override zone. -
Restart bind
-
Put the following lines in cronjob:
*/5 * * * * /usr/bin/python /srv/dns/updatebind.py --update-zone -r > /dev/null 20 4 * * * /usr/bin/python /srv/dns/updatebind.py --update-named-conf-options > /dev/null