perfect multi server ubuntu DNS Slave not responding

Discussion in 'HOWTO-Related Questions' started by blake bertling, Dec 23, 2024.

  1. blake bertling

    blake bertling New Member

    im green with linux, so please forgive my ignorance.

    i built up my servers following the multiserver guide. ubuntu 20.04 mutiserver dns and panel

    i have 3 servers, panel, ns1 and ns2. i update the panel to have records for NS1. i set up the secondary zone following the instructions at the end of NS2 setup, and configured for DNSSEC.
    my NS1 responds just fine, using MXtoolbox, trying to hit all my NS servers, it fails on NS2 saying it could not be found.
    i did Dig @localhost domain.com on the servers, and it came up the correct records, so i assume records are replicating.
    NS1 and NS2 are listed on both the old and new servers, both as an A record and NS record.

    i have an old server lets call it NS1old, that is also responding just fine.

    all 3 servers are nat'ed through our firewall. firewall settings for each host are set. i verified the nat IPs listing the public ones on the record and internal records in the servers hosts file.

    i dont have any .err files, i did at one point, finished setting my records up and it went away... i didnt see much in the logs other than domain requests...

    where should i look for more answers?

    thanks for any help anyone can provide!
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Why such old Ubuntu? Current is 24.04, so four years newer.
    Are the IP-addresses local addresses in your NAT:ted intranet or global routable addresses?
    You should verify the are, avoid assuming.
    Did you set up mirroring for ns2 host? Or are you using secondary zones on ns2?
    My signature has link to DNS setup tutorial, it has info on how to verify the name service is working.
    My guess is the NAT setup or forwarding of name service queries from Internet to ns2 is not working properly. I have not used name servers behind NAT so can not offer tips on what might be wrong. Test from outside your intranet if you can access the name servers.
     
  3. blake bertling

    blake bertling New Member

    i started with 24. but i ran in to a compatibility issue with ispconfig and DNS. if im incorrect, im more than happy to upgrade. ive rebuilt this one 3 times now, so im getting quicker lol.

    The IP addresses for the NS servers are the external addresses, the local config on the servers points to their local internal IP address. im using meraki firewall to NAT the IPs through. NS1 and NS2(old) are both natted through without issue and respond. the new NS2 server was responding for a short time, it then stopped as i added more zones. i reinstalled everything to get where i am now.

    i did some checks using dig @localhost domain.com and everything resolved, thats where my assumption comes from, but im assuming i did this right lol. i did just follow your article, the first test. i was able to run the commands on my NS2 and get details back. pointing at the public IP for the NS2 server and @localhost. i then did the Dig test again, it appears to resolve correctly.

    "root@ns2:/home/nsadmin# dig @173.195.x.x domain.com" edited example of my command, incase i did something wrong. this pulled up the correct records. i was also able to do one to the ns2 server by name and got the correct DNS A record.

    i was going to do mirroring, but im using DNSSEC so i created the secondary zones. and just to be clear, i access my portal through the Panel server, i created my first zone, assigned it to NS1, fill out the IP transfer field so that it can speak to NS2, i add the secondary zone through the same portal, add it to NS2 from the drop down, then set the NS1 IP to allow sync.

    this is the walkthrough i was using. ispconfig-multiserver-setup-debian-ubuntu/6/

    i keep wondering if the firewall is the issue, but its not blocking either of the other 2 servers, no names or IPs are re-used or duplicate... tho i am considering a new public IP assignment for the problem server. my old servers were ispconfig servers on ubuntu, they just werent mirrored or synced, it was two independent sites that i individually updated. this is my first time to use the multiserver setup to try and make a single portal for dual systems.

    let me know what you think, thanks so much for the time and happy holidays!
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    There are no compatibility issues with Ubuntu 24.04. You should have asked instead of using an older OS.
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    You created a primary zone on ns1 and a secondary zone on ns2, mirroring in ISPConfig is not used, is that correct? Have you set the IP address of ns2 in the allow transfer to field of the primary zone on server 1?
     
  6. blake bertling

    blake bertling New Member

    noted. would that have any impact on my current issue? im just realizing i had meant to run on 22.04... i may rebuild with 24, i dont know where i saw a compatibility issue...
     
    Last edited: Dec 30, 2024
  7. blake bertling

    blake bertling New Member

    Mirroring is not set. yes, i did set the records accordingly. does the dig test prove that i have replication working just fine? it sounds like im good, just need to figure out whats going on between my firewall.
     
    Last edited: Dec 30, 2024
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    No.

    I recommend looking at syslog file when restarting bind or when changing something in the primary record. Bind should tell you in the log that it tried to notify ns2 server and also ns2 should have logged something if fetching the record failed.

    If you have the zone record on the primary and the slave zone config on the secondary server in the BIND config, then it can just be a firewall issue.
     
    blake bertling likes this.
  9. blake bertling

    blake bertling New Member

    looking under /var/log it appears the bind was successful. i do get some errors "... denied (allow-query-cache did not match). but it says all zone loaded. attached a screen shot of my logs.
     

    Attached Files:

  10. till

    till Super Moderator Staff Member ISPConfig Developer

    Hmm, I see that it has been reloaded but not that it snyced the zone. If you query the zone like this on both servers:

    dig @localhost yourdomain.tld

    does it work then?
     
  11. blake bertling

    blake bertling New Member

    it does not. ns2 does not show the right info now. i uploaded more of the syslog, primary server is rosey, secondary is c3po. ns1 and ns2 are the names of the old servers.
     

    Attached Files:

  12. till

    till Super Moderator Staff Member ISPConfig Developer

    Have you checked that the secondary zone config (the one that is responsible for syncing the zone) has been written on the secondary server? It should be in a subfolder named slave and the config file starts with sec.
     
    blake bertling likes this.
  13. blake bertling

    blake bertling New Member

    there is a Slave folder on both name servers. but its empty, and can only be accessed with sudo. in the directory /etc/bind/slave
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    Is the slave zone on ns2 listed in /etc/bind/named.conf.local ?

    Example?

    root@server1:~# cat /etc/bind/named.conf.local

    zone "test2.tld" {
    type slave;
    masters {192.168.0.100;};
    allow-transfer {none;};
    file "/etc/bind/slave/sec.test2.tld";
    };

    You can also try to change the owner of the slave folder to the user 'bind' and restart named.
     
    blake bertling likes this.
  15. blake bertling

    blake bertling New Member

    from the NS2 server, running the command like you did, i get

    "domain.com" {
    type slave;
    masters {Correct public IP for NS1;};
    allow-transfer {none;};
    file "/etc/bind/slave/sec.domain.com";
    could it be that i need to have the Internal IP for NS1 there?
     
  16. blake bertling

    blake bertling New Member


    UPDATE, that did it. i changed the IPs listed to the internal IPs. its now resolving on mxtoolbox... i reset bind and checked the conf.local file to make sure it updated.

    thanks so much for yalls help! i really appreciate your time and efforts!!
     
    till likes this.
  17. remkoh

    remkoh Active Member HowtoForge Supporter

    Internal IP's is correct (asuming the servers are in the same lan).
    For both transfers and notifications.

    It's only for dns server to get updates from and has otherwise no binding with clients trying to use that dns server to resolve a domain.
     
  18. till

    till Super Moderator Staff Member ISPConfig Developer

    Just a note as your systems are behind a NAT router: to get Let's Encrypt certificates in your environment for websites, you'll likely have to enable the "Skip Let's Encrypt check" checkbox under System > Server config > web.
     
    blake bertling and ahrasis like this.
  19. blake bertling

    blake bertling New Member

    noted. i plan to keep this to DNS only. my next goal is to upgrade everything in place, since i installed such an old version.
    thanks again for your help!
     

Share This Page