Skip to main content

also-notify and allow-axfr with powerdns

Comments

3 comments

  • cPRex Jurassic Moderator

    Hey there!  For the notifies function, can you try this option mentioned here?

    https://www.ncartron.org/making-powerdns-send-notifies-to-secondaries.html

    Can you get me more details on what specifically you're changing in regards to the laptop IP to get that working?

    0
  • Brian Hope

    I know this was a long time ago, but that blog post says to run a command that I don't think works on cPanel because cPanel uses the BIND backend:

    pdnsutil set-kind example.com primary

    And so when I ran it on my cPanel 134.0.30 server, I got:

    May 26 21:15:01 [bindbackend] Done parsing domains, 0 rejected, 30 new, 0 removed
    Could not find backend willing to accept new zone configuration

    I have found another thing that interferes. ALIAS records are super dangerous. I get it. I created the silly file that says yes, yes, I know they're dangerous. Here's one of the ways they can cause problems.

    ALIAS records need a fully qualified domain name, including the trailing dot, much like a CNAME. I had a record like:

    example.com. 86400   IN      ALIAS   example-com.firebaseapp.com

    And that resolves to example-com.firebaseapp.com.example.com. And that doesn't resolve at all, so the ALIAS record doesn't work. But the error in /var/log/syslog is really misleading:

    May 26 21:07:46 cpanel pdns_server[2330730]: AXFR-out zone 'example.com',
    client '111.111.111.111:37163', example.com: error resolving AAAA record
    for ALIAS target example-com.firebaseapp.com.example.com.,
    continuing AXFR

    See, it SAYS "continuing AXFR" but I'm pretty sure it did not. Because my upstream DNS server was complaining that it was not getting the records. My upstream service was giving me a confusing connection refused error, but I don't think the connection was refused at all. I think the AXFR was crashing or stopping in the middle or something.

    Anyways, fixing the ALIAS record so that it would resolve got AXFRs to complete successfully.

    I'm using DNS Made Easy as my public DNS servers, and I have my cPanel server as a "shadow master." That is, my cPanel server's IP is not published as an NS record in the zone. Only the DNS Made Easy servers are published.

    Here's my total solution for this shadow master arrangement. Note there is a really interesting asymmetry here. For a lot of systems, the DNS server that you notify is the same server that will initiate the AXFR. At DME, they have one set of IPs that I send notifies to, and a different set of IPs that actually initiate the transfer.

    1. Put disable-axfr=no in /etc/pdns/pdns.conf
    2. Put allow-axfr-ips=127.0.0.0/8,::1,208.94.148.13/32,208.80.124.13/32,208.80.126.13/32 into /etc/pdns/pdns.conf
    3. Put allow-transfer { 208.94.148.13/32; 208.80.124.13/32; 208.80.126.13/32; }; into /etc/named.conf
    4. Edited the /etc/named.conf configuration for example.com so it looks like:
      zone "example.com" {
              type master;
              file "/var/named/example.com.db";
              also-notify { 208.94.147.135; 208.94.150.198; 63.219.151.12; };
      };
      There are 2 views, internal and external. I put this also-notify line in both views, but I'm sure it's unnecessary in the internal view.

    Any time I add a zone that I want to do a shadow master configuration I have to edit /etc/named.conf directly like that. I write this all up so maybe someone else looking for similar information can find it here.

    0
  • cPRex Jurassic Moderator

    Thanks for sharing - you're correct that the command may not work on the latest cPanel systems.  

    0

Please sign in to leave a comment.