Skip to content
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

  1. Server names: dns0.lokun.is and dns1.lokun.is .
  2. DNS servers both serve as DNS caches to VPN clients and as resolvers for the lokun.is domain
  3. The resolver is dynamically updated with info from record. Currently via the REST api, but there have been experiments with using ZeroMQ.
  4. Zones such as netflix.com are being overridden and directed through a US based proxy

Setup

  1. Install from apt and pip

    # sudo apt-get install bind9 python-pip python-dev
    # pip install requests
    
  2. Get the updatebind.py script from lokun (private) repo and store in /srv/dns, also include config.py and fill out accordingly

  3. Create the zone file and named.conf.options

    # python /srv/dns/updatebind --update-zone --update-named-conf-options
    # /etc/init.d/bind9 restart
    
  4. Copy the override zone file /etc/bind/db.overide from lokun repo.

    There are on secrets to this, see Tunlr-Clone if you want your own.

  5. Copy /etc/bind/named.conf.local from the same repo. Maps domains to override zone.

  6. Restart bind

  7. 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
    

Clone this wiki locally