Creating secondary DNS Zones automatically

Discussion in 'Installation/Configuration' started by brainsys, Jul 26, 2021.

  1. brainsys

    brainsys Member

    Today I cracked my first remote API - Yay!

    This created a secondary DNS Zone and it works perfectly. Now I want the creation of a Primary DNS Zone on the control panel on server1 to automatically kick off my secondary server API script. But I haven't a clue how to do that. Any ideas?

    Or do I just use crontab every day to check & write?
     
  2. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    Take a look at https://git.schaal-it.com/ispconfig/dnssec-slave - it is a server plugin which runs when dns zones are inserted/updated/deleted, which might be what you want. It doesn't run when individual zone records are inserted/updated/deleted, but that is a similar concept. (In fact, the script as it is may be a complete implementation of what you're wanting to do without using the remote api, if you simply want to have one slave dns server mirror all zones added to a master.)
     
  3. brainsys

    brainsys Member

    Thanks. I'll look into this. Best try it on some VMs first I think in case I screw up. There's about 200 domains at stake on the production servers.
     
  4. Chris_UK

    Chris_UK Active Member HowtoForge Supporter

    Sorry to Jump in here I know im not strictly on topic, but can you tell me exactly what's the difference between the secondary dns zone option and just mirroring the dns zone from a primary dns server?
     
  5. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Mirroring and secondary zone are two different ways to make another dns server. Secondary zone is the way bind itself makes the second server and this is described in bind documentation, for example book Albitz, Liu: DNS and Bind. In this setup first server is primary and the other is secondary (master and slave, in old terminology). Bind does the copying of zone data itself.
    Mirroring is the ISPConfig way of setting up a second server. ISPConfig sets up copying zone files, and both servers are primary since they have identical zone files and setup.
    ISPConfig manual has some info on these.
     
    Chris_UK likes this.
  6. Chris_UK

    Chris_UK Active Member HowtoForge Supporter

    It actually makes a whole lot of sense now, I was confused as to why it was there when mirroring seems to be the norm in ISPC. Thank you very much for clarifying that for me.
     
  7. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    There were some limitations in mirroring ISPConfig dns server, if I remember correctly, which one of them is dnssec. However, it will work on master slave basis, I think.
     
  8. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    I moved from mirroring to Secondary Zones to be able to use DNSSEC, which like @ahrasis wrote does not work with mirroring. ISPConfig supports mirroring better, I must remember to create secondary zone for each new zone I add, for example. There is feature request to make this automatic, however.
     
  9. florian030

    florian030 ISPConfig Developer ISPConfig Developer

Share This Page