DNS servers

VHFFS uses MyDNS-NG as DNS server, which works with a database to read domain name configuration.

Site: http://www.mydns-ng.com

MyDNS-NG is not Debian packaged, you can grab the latest package for your architecture from http://download.tuxfamily.org/vhffs4/debian/pool/main/mydns/ and install it.

wget "http://download.tuxfamily.org/vhffs4/debian/pool/main/mydns/mydns-pgsql_1.2.8.31-2_amd64.deb"
dpkg -i mydns-pgsql_1.2.8.31-2_amd64.deb

Server using the main VHFFS database, "primary"

Copy the example configuration file:

cp /etc/mydns.conf{.example,}

Open the file and modify following lines:

db-host = localhost             # SQL server hostname
db-user = vhffs                 # SQL server username
db-password = password          # SQL server password
database = vhffs                # MyDNS database name

allow-tcp = yes                 # Should TCP be enabled?

soa-table = vhffs_dns_soa       # Name of table containing SOA records
rr-table = vhffs_dns_rr         # Name of table containing RR data

Server using a copy of the VHFFS database, "secondary"

Using a VHFFS replicated PostgreSQL database

After PostgreSQL replication is configured, just follow the “primary” DNS server install.

Using the mirror script

Copy the DNS mirror script in some place.

cp /usr/share/vhffs/backend/mirror/mydns-mirror.pl /usr/local/sbin/
chmod o-rwx /usr/local/sbin/mydns-mirror.pl 
chmod ug+x /usr/local/sbin/mydns-mirror.pl

Create the PostgreSQL secondary DNS database and structures

su - postgres -c "createuser -P ns2"
su - postgres -c "createdb -O ns2 ns2"
psql ns2 ns2 -h localhost
ns2=> \i /usr/share/vhffs/backend/mirror/mydns-mirror.sql

Edit the mydns-mirror.pl script to modify connection fields to both master and slave SQL servers.

Install required dependencies:

apt-get install libdbd-pg-perl

Modify your firewall or anything necessary so that the slave server can connect to the master server.

Then run the mydns-mirror.pl script, it should work


Finally, you have to configure the MyDNS server on the secondary host using the secondary database in the same way we did to the primary server.

Of course, you need to run from time to time the mydns-mirror.pl script to update the PostgreSQL database, we let you add the necessary cron entry.

As you may have noticed, the mirror script don't need the VHFFS API to run, so you don't need to install VHFFS on hosts that are going to be secondary NS

Activate domain name transfer for MyDNS

Read the tutorial

doc/installationguide/dns-service.txt · Last modified: 2014/12/14 14:59 by gradator
Recent changes RSS feed Creative Commons License Donate Minima Template by Wikidesign Driven by DokuWiki