Multiple DNS Servers

Discussion in 'Installation/Configuration' started by Çağrı Aksu, Oct 1, 2025.

  1. Çağrı Aksu

    Çağrı Aksu New Member

    Hi all,

    I believe I'm a noob at this point for asking this but I've looked very deep (maybe at the wrong place) but couldn't find a solution so please bear with me. I have installed ISPC on 4 different servers with all of them having all the services available, but only the first one have the control panel.
    I did it this way because I want to load balance my domains accross those servers, and each domain will completely live on a single server (web, db, mail etc.) while the dns records will be on all servers.
    Now when I add a domain, the dns records got written to all servers, but other than the server that the domain lives, no server is answering to DNS queries, except if its coming from the main server.
    I tried selecting "mirror of" option, but this axes my original goal of having 4 different servers hosting different domains thing. I tried adding the second server as a secondary dns zone, but this makes it even weird, beacause SOA's got misaligned this way etc...

    I couldn't find a solution for my problem, maybe there is none? Please give me some rope, I'm about to lose my sanity :D
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Do not use mirroring for DNS. Create a primary zone on the server that shall be the master, and then create secondary zones on the other ones. The systems where you make the secondary zones will automatically pull the data from the master BIND server. The DNS zone creation is all done through the control panel of your main server, if you have installed the system as an ISPConfig multiserver setup.
     
    Çağrı Aksu likes this.
  3. Çağrı Aksu

    Çağrı Aksu New Member

    Hi Till, thanks for the quick reply. To make sure that I've got your solution correctly let me ask, do I need to install the 2nd 3rd and 4th server with the web panel as well? When installing the 1st server do I need to select Yes when the question "
    Shall this server join an existing ISPConfig multiserver setup" comes up? and also when creating the secondary zones from the 1st server (if I got this part right) should I create a secondary zone for each of my servers? I have 4 nameservers, and the secondary zone creation only asks for two, but my template already has 4 ns setup, will that be a problem?

    Thank you very much for your help in advance!

    Edit: I did add the second and third servers as secondary zones from the panel, and they started responding, but their SOA's do not match :(
     
    Last edited: Oct 1, 2025
  4. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    Never install ISPConfig web panel other than in the master server.
     
    Çağrı Aksu likes this.
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Did you reinstall or cleaned up the config after you enabled mirroring? Enabling mirroring and then disabling it again will leave you with a unclean setup as this can be set only at the start. So it might be that you see old soas now that were left there from switching on mirroring.
     
    Çağrı Aksu likes this.
  6. Çağrı Aksu

    Çağrı Aksu New Member

    This is exactly what I've done, should I go back and reinstall my non primary servers, or is there way to align the SOA's at this point?
     
  7. Çağrı Aksu

    Çağrı Aksu New Member

    Nope, I did not installed it to other servers :)
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    A reinstall should not be necessary. Check the configuration files of BIND on the slave nodes to ensure they no longer contain the old primary zone, and clean them up if required.
     
    Çağrı Aksu likes this.
  9. Çağrı Aksu

    Çağrı Aksu New Member

    Since I was at the very beginning with the servers, I go ahead and re-installed all 3 of my secondary servers to begin with a clean slate. Now DNS does seem to work as it should be, I've just 1 confusion here, I create secondary zones for all 3 servers whenever I add another domain to my system, but when adding I use all 4 IP's of the servers for NS records at that page, and for Zone Transfers too. Is this the correct method to do so?

    One more thing, the last secondary dns server (ns4 in this case) becomes the primary ns, I noticed this when checking for errors at intodns.com, is that also correct behaviour in this case?
     
    Last edited: Oct 3, 2025 at 7:33 PM
  10. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    If you want all four name servers to be used as name servers there must be NS record for each.
    Zone transfer to all the secondary servers must be allowed. You do not need to add primary to allowed hosts to transfer zones to.
    Primary is the server where you edit the zones. Other servers are secondaries, they just get zone transfers from the primary. You would need to show the intodns report if you want to ask whether it is accurate or not or what it means.
     
    ahrasis likes this.
  11. Çağrı Aksu

    Çağrı Aksu New Member

    For your information, I've noticed that the primary NS moves to the secondary servers as I begin to add them, maybe because of the design, or maybe an oversight, but this happens on all new domains that I add to my system. After adding them I go to zone settings and fix the primary ns setting back to NS1 and it gets updated.
     
  12. remkoh

    remkoh Active Member HowtoForge Supporter

    Do you mean the order of NS records?
    That doesn't matter at all!
    Every zone has X number of NS records, all equal. The internet doesn't know and doesn't need to know which DNS server is primary and secondary as they all should have the same info.
     
  13. Çağrı Aksu

    Çağrı Aksu New Member

    I just mean the Primary NS value in the SOA record. I know it does not make any difference, I just wonder why does it happen clearly I'm adding the other 3 servers as secondary zones :)
     
  14. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    SOA record does not show which name server is primary or secondary. To see that, examine the zone record. For primary server (for that zone) there is type master; (or type primary) and for secondary server (for that zone) there is type slave; (or type secondary).
     
  15. Çağrı Aksu

    Çağrı Aksu New Member

    I'm confused, the SOA record shows the primary nameserver when I dig it from CLI or from intodns.com, and it shows the primary nameserver that I've set under the zone options.
     
  16. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    How does the SOA record show the primary server?
    Does intodns show same primary as written in the zone record configuration?
     
  17. Çağrı Aksu

    Çağrı Aksu New Member

    Yes sir, here it is: upload_2025-10-8_15-25-45.png

    And here the relevant configuration page from ISPC: upload_2025-10-8_15-26-32.png
     

Share This Page