[GH-ISSUE #47] Master & Slave NS Setup #32

Closed
opened 2026-02-26 10:35:40 +03:00 by kerem · 7 comments
Owner

Originally created by @dfiel on GitHub (Jun 8, 2016).
Original GitHub issue: https://github.com/PowerDNS-Admin/PowerDNS-Admin/issues/47

Hello All,

I followed the DigitalOcean tutorial to set up master and slave servers. In order for the domain to replicate, there must be 2 NS records in the domain. I don't see an option to add NS records. Am I missing something?

Originally created by @dfiel on GitHub (Jun 8, 2016). Original GitHub issue: https://github.com/PowerDNS-Admin/PowerDNS-Admin/issues/47 Hello All, I followed the [DigitalOcean tutorial](https://www.digitalocean.com/community/tutorials/how-to-configure-dns-replication-on-a-slave-powerdns-server-on-ubuntu-14-04) to set up master and slave servers. In order for the domain to replicate, there must be 2 NS records in the domain. I don't see an option to add NS records. Am I missing something?
kerem 2026-02-26 10:35:40 +03:00
Author
Owner

@ivanfilippov commented on GitHub (Jun 8, 2016):

Hi @dfiel

Thanks for trying PowerDNS-Admin! You'll need to add the NS record type into config.py. Find the line that says this:
RECORDS_ALLOW_EDIT = ['A', 'AAAA', 'CNAME', 'SPF', 'PTR', 'MX', 'TXT']
and change it to this:
RECORDS_ALLOW_EDIT = ['A', 'AAAA', 'CNAME', 'SPF', 'PTR', 'MX', 'TXT', 'NS']

Let me know if that helps. 😄

<!-- gh-comment-id:224750330 --> @ivanfilippov commented on GitHub (Jun 8, 2016): Hi @dfiel Thanks for trying PowerDNS-Admin! You'll need to add the NS record type into `config.py`. Find the line that says this: `RECORDS_ALLOW_EDIT = ['A', 'AAAA', 'CNAME', 'SPF', 'PTR', 'MX', 'TXT']` and change it to this: `RECORDS_ALLOW_EDIT = ['A', 'AAAA', 'CNAME', 'SPF', 'PTR', 'MX', 'TXT', 'NS']` Let me know if that helps. :smile:
Author
Owner

@dfiel commented on GitHub (Jun 9, 2016):

@ivanfilippov Yes, that worked. Now I just have to get the actual syncing of records to work. Would you know anything about that?

<!-- gh-comment-id:224778711 --> @dfiel commented on GitHub (Jun 9, 2016): @ivanfilippov Yes, that worked. Now I just have to get the actual syncing of records to work. Would you know anything about that?
Author
Owner

@ivanfilippov commented on GitHub (Jun 9, 2016):

This is how you'd configure a traditional master/slave setup:

  • Make sure you have allow-axfr-ips=<your slaves IP address> set in the masters /etc/powerdns/pdns.conf.
  • Add a new domain as a master on the PowerDNS-Admin instance on the master
  • Add the same domain as a slave on the PowerDNS-Admin instance on the slave (making sure to enter the masters IP address when you do it)
  • That's it, PowerDNS will take care of replication by itself

You can also configure 'supermaster' functionality which is a very cool feature in PowerDNS. This makes the slave automatically query the master for all domains the master hosts and create slave domains for them as long as the slave is one of the configured nameservers. All you'd need to do is add the masters IP address and the current servers hostname into the supermasters database table on the slave. PowerDNS-Admin doesn't have this functionality so you'll need to do it manually via the SQL command line or a tool like phpMyAdmin. Something like:

INSERT INTO supermasters VALUES ('<your masters IP address>', '<your slaves hostname>', 'admin');

The DigitalOcean tutorial you linked actually uses this method so I'd recommend going with it. You also won't need a PowerDNS-Admin instance on the slave.

<!-- gh-comment-id:224781424 --> @ivanfilippov commented on GitHub (Jun 9, 2016): This is how you'd configure a traditional master/slave setup: - Make sure you have `allow-axfr-ips=<your slaves IP address>` set in the masters `/etc/powerdns/pdns.conf`. - Add a new domain as a master on the PowerDNS-Admin instance on the master - Add the same domain as a slave on the PowerDNS-Admin instance on the slave (making sure to enter the masters IP address when you do it) - That's it, PowerDNS will take care of replication by itself You can also configure 'supermaster' functionality which is a very cool feature in PowerDNS. This makes the slave automatically query the master for all domains the master hosts and create slave domains for them as long as the slave is one of the configured nameservers. All you'd need to do is add the masters IP address and the current servers hostname into the supermasters database table on the slave. PowerDNS-Admin doesn't have this functionality so you'll need to do it manually via the SQL command line or a tool like phpMyAdmin. Something like: ``` sql INSERT INTO supermasters VALUES ('<your masters IP address>', '<your slaves hostname>', 'admin'); ``` The DigitalOcean tutorial you linked actually uses this method so I'd recommend going with it. You also won't need a PowerDNS-Admin instance on the slave.
Author
Owner

@dfiel commented on GitHub (Jun 9, 2016):

@ivanfilippov How long does this usually take to propagate? My settings look like this:

 +---------------+------------------------+---------+
 | ip            | nameserver             | account |
 +---------------+------------------------+---------+
 | 104.XXX.61.XX | ns2.XXXXXXXXXXXXXX.xyz | admin   |
 +---------------+------------------------+---------+

The correct master IP is in the above record, and the settings in PowerDNS-Admin on the host look like this:
image

Am I missing something, or are my settings wrong?

<!-- gh-comment-id:225037829 --> @dfiel commented on GitHub (Jun 9, 2016): @ivanfilippov How long does this usually take to propagate? My settings look like this: ``` +---------------+------------------------+---------+ | ip | nameserver | account | +---------------+------------------------+---------+ | 104.XXX.61.XX | ns2.XXXXXXXXXXXXXX.xyz | admin | +---------------+------------------------+---------+ ``` The correct master IP is in the above record, and the settings in PowerDNS-Admin on the host look like this: ![image](https://cloud.githubusercontent.com/assets/7292540/15947661/c2552722-2e6a-11e6-96ae-4fc94dd7d89b.png) Am I missing something, or are my settings wrong?
Author
Owner

@ivanfilippov commented on GitHub (Jun 10, 2016):

Your settings look good to me. To confirm, the supermaster snip you pasted above is on the slave server and the screenshot is from master, correct?

Also, have you tested to make that your slave can access and query the master? Something like running dig ns1.yourdomain.com @yourmastersIP on the slave should do it.

<!-- gh-comment-id:225068553 --> @ivanfilippov commented on GitHub (Jun 10, 2016): Your settings look good to me. To confirm, the supermaster snip you pasted above is on the slave server and the screenshot is from master, correct? Also, have you tested to make that your slave can access and query the master? Something like running `dig ns1.yourdomain.com @yourmastersIP` on the slave should do it.
Author
Owner

@dfiel commented on GitHub (Jun 10, 2016):

@ivanfilippov Yes, the MySQL results are on the slave, and the screenshot is from my master server.

Using dig as you mention returned the correct IP as an A record.

<!-- gh-comment-id:225305952 --> @dfiel commented on GitHub (Jun 10, 2016): @ivanfilippov Yes, the MySQL results are on the slave, and the screenshot is from my master server. Using dig as you mention returned the correct IP as an A record.
Author
Owner

@ivanfilippov commented on GitHub (Jun 21, 2016):

Hi @dfiel

Sorry for the delay. This may be a bit beyond my abilities, you might want to ask for help on the PowerDNS forums/github.

<!-- gh-comment-id:227588872 --> @ivanfilippov commented on GitHub (Jun 21, 2016): Hi @dfiel Sorry for the delay. This may be a bit beyond my abilities, you might want to ask for help on the PowerDNS forums/github.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/PowerDNS-Admin-PowerDNS-Admin#32
No description provided.