Atomia DNS

Installation

92 views 0

Installing the Atomia DNS PowerDNS Nameserver.

Installation on Ubuntu LTS

  1. Install the latest Ubuntu LTS relase.
  2. Add the Atomia APT Repository to the server using:
  3. wget -q -O - http://public.apt.atomia.com/setup.sh.shtml | sed s/%distcode/`lsb_release -c | awk '{ print $2 }'`/g | sh
    
  4. Install the database schema (will also install MySQL):
  5. apt-get install atomiadns-powerdns-database
    
  6. To configure the nameserver to get zones from your Atomia DNS installation, add soap_uri, soap_cacert, soap_username and soap_password to /etc/atomiadns.conf:
  7. soap_uri = https://some.server.example.com/atomiadns soap_cacert = /path/to/CA_cert_that_signed_SSL_cert soap_username = someuser soap_password = somepass
    
  8. Also add /etc/atomiadns.conf to the subscriber name for this nameserver:
  9. servername = powerdns1
    
  10. Install the PowerDNS sync agent:
  11. apt-get install atomiadns-powerdnssync
    
  12. Add the nameserver as subscriber of the zones (replace default with whatever server group it is to be member of):
  13. atomiapowerdnssync add_server default
    
  14. Start the daemon:
  15. start atomiadns-powerdnssync
    
  16. Sync all zones:
  17. atomiapowerdnssync full_reload_online
    
  18. Go to https://www.powerdns.com/downloads.html and download the latest .deb package
  19. Install it using (replace filename):
  20. dpkg -i pdns-static_3.0-rc1-1_amd64.deb
    
  21. When it asks if you want to replace /etc/powerdns/pdns.conf, just press enter to keep the version that atomiadns-powerdns-database preconfigured for you.


Important!

AtomiaDNS supports global DNSSEC keys, so you have to overwrite the default query to read crypto keys from the global table. Put the following parameter in /etc/powerdns/pdns.conf

gmysql-list-domain-keys-query=select id, flags, active, content from global_cryptokeys where id <> ?



Installation on FreeBSD

  1. Do a standard installation of FreeBSD. The instructions where tested with FreeBSD 10.0-RELEASE, but should work on other versions as well.
  2. Make sure you have an up-to-date ports collection, as described in the FreeBSD handbook.
    1. This step is only neccessary as long as the Atomia DNS ports are not in the main ports collection.
    2. cd /usr/ports/dns ; fetch -q -o - http://atomiadns.com/tarballs/bleeding.tar.gz | tar xvfpz - --strip-components 2 "*/freebsd"
      
  3. Install MySQL and create the database:
  4. cd /usr/ports/databases/mysql55-server make BATCH=yes install echo 'mysql_enable="YES"' &gt;&gt; /etc/rc.conf /usr/local/etc/rc.d/mysql-server start mysql -u root mysql -e "drop database test; delete from db; delete from user where user = ''; delete from user where host &lt;&lt; 'localhost'; flush privileges" mysqladmin create powerdns set powerdns_pw=`sh -c 'dd if=/dev/urandom bs=1024 count=1 2&gt; /dev/null | sha1'` mysql -u root -e "grant all on powerdns.* to 'powerdns'@'localhost' identified by '$powerdns_pw'" cat &gt; /root/pdns.conf.tmp &lt;&lt;EOF launch=gmysql gmysql-host=localhost gmysql-user=powerdns gmysql-dbname=powerdns gmysql-password=$powerdns_pw gmysql-dnssec=yes EOF
    
  5. Install PowerDNS:
  6. cd /usr/ports/dns/powerdns make BATCH=yes WITH_MYSQL=YES WITHOUT_PGSQL=YES install echo 'pdns_enable="YES"' &gt;&gt; /etc/rc.conf echo 'pdns_flags="--daemon --guardian=yes"' &gt;&gt; /etc/rc.conf mv /root/pdns.conf.tmp /usr/local/etc/pdns/pdns.conf
    
  7. Install atomiadns-powerdnssync:
  8. cd /usr/ports/dns/atomiadns-powerdnssync make BATCH=yes install atomiadns-sync-powerdns-database /usr/local/etc/pdns/pdns.conf echo "servername = `hostname`" &gt;&gt; /etc/atomiadns.conf echo 'soap_uri=http://INSERT_IP_OF_API_SERVER/atomiadns' &gt;&gt; /etc/atomiadns.conf echo 'soap_username=YOUR_OPTIONAL_BUT_OBVIOUSLY_HIGHLY_RECOMMENDED_API_SERVER_USERNAME' &gt;&gt; /etc/atomiadns.conf echo 'soap_password=YOUR_OPTIONAL_BUT_OBVIOUSLY_HIGHLY_RECOMMENDED_API_SERVER_PASSWORD' &gt;&gt; /etc/atomiadns.conf echo 'atomiapowerdnssync_enable="YES"' &gt;&gt; /etc/rc.conf atomiapowerdnssync add_server default /usr/local/etc/rc.d/atomiapowerdnssync start atomiapowerdnssync full_reload_online
    
  9. Start PowerDNS:
  10. /usr/local/etc/rc.d/pdns start
    

Software used by Atomia DNS PowerDNS Nameserver

On the nameservers the following software is needed:

  • PowerDNS
  • MySQL
  • Atomia DNS PowerDNS sync

Was this helpful?