Installing the Atomia DNS PowerDNS Nameserver.
Installation on Ubuntu LTS
- Install the latest Ubuntu LTS relase.
- Add the Atomia APT Repository to the server using:
- Install the database schema (will also install MySQL):
- 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:
- Also add /etc/atomiadns.conf to the subscriber name for this nameserver:
- Install the PowerDNS sync agent:
- Add the nameserver as subscriber of the zones (replace default with whatever server group it is to be member of):
- Start the daemon:
- Sync all zones:
- Go to https://www.powerdns.com/downloads.html and download the latest .deb package
- Install it using (replace filename):
- 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.
wget -q -O - http://public.apt.atomia.com/setup.sh.shtml | sed s/%distcode/`lsb_release -c | awk '{ print $2 }'`/g | sh
apt-get install atomiadns-powerdns-database
soap_uri = https://some.server.example.com/atomiadns soap_cacert = /path/to/CA_cert_that_signed_SSL_cert soap_username = someuser soap_password = somepass
servername = powerdns1
apt-get install atomiadns-powerdnssync
atomiapowerdnssync add_server default
start atomiadns-powerdnssync
atomiapowerdnssync full_reload_online
dpkg -i pdns-static_3.0-rc1-1_amd64.deb
Installation on FreeBSD
- Do a standard installation of FreeBSD. The instructions where tested with FreeBSD 10.0-RELEASE, but should work on other versions as well.
- Make sure you have an up-to-date ports collection, as described in the FreeBSD handbook.
- This step is only neccessary as long as the Atomia DNS ports are not in the main ports collection.
- Install MySQL and create the database:
- Install PowerDNS:
- Install atomiadns-powerdnssync:
- Start PowerDNS:
cd /usr/ports/dns ; fetch -q -o - http://atomiadns.com/tarballs/bleeding.tar.gz | tar xvfpz - --strip-components 2 "*/freebsd"
cd /usr/ports/databases/mysql55-server make BATCH=yes install echo 'mysql_enable="YES"' >> /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 << 'localhost'; flush privileges" mysqladmin create powerdns set powerdns_pw=`sh -c 'dd if=/dev/urandom bs=1024 count=1 2> /dev/null | sha1'` mysql -u root -e "grant all on powerdns.* to 'powerdns'@'localhost' identified by '$powerdns_pw'" cat > /root/pdns.conf.tmp <<EOF launch=gmysql gmysql-host=localhost gmysql-user=powerdns gmysql-dbname=powerdns gmysql-password=$powerdns_pw gmysql-dnssec=yes EOF
cd /usr/ports/dns/powerdns make BATCH=yes WITH_MYSQL=YES WITHOUT_PGSQL=YES install echo 'pdns_enable="YES"' >> /etc/rc.conf echo 'pdns_flags="--daemon --guardian=yes"' >> /etc/rc.conf mv /root/pdns.conf.tmp /usr/local/etc/pdns/pdns.conf
cd /usr/ports/dns/atomiadns-powerdnssync make BATCH=yes install atomiadns-sync-powerdns-database /usr/local/etc/pdns/pdns.conf echo "servername = `hostname`" >> /etc/atomiadns.conf echo 'soap_uri=http://INSERT_IP_OF_API_SERVER/atomiadns' >> /etc/atomiadns.conf echo 'soap_username=YOUR_OPTIONAL_BUT_OBVIOUSLY_HIGHLY_RECOMMENDED_API_SERVER_USERNAME' >> /etc/atomiadns.conf echo 'soap_password=YOUR_OPTIONAL_BUT_OBVIOUSLY_HIGHLY_RECOMMENDED_API_SERVER_PASSWORD' >> /etc/atomiadns.conf echo 'atomiapowerdnssync_enable="YES"' >> /etc/rc.conf atomiapowerdnssync add_server default /usr/local/etc/rc.d/atomiapowerdnssync start atomiapowerdnssync full_reload_online
/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