Removing mirror configuration

Discussion in 'Installation/Configuration' started by Frans Luteijn, Jun 6, 2023.

  1. Frans Luteijn

    Frans Luteijn New Member

    Hello all,
    We've got an ISPConfig setup which includes two DNS servers, ns01 and ns02. Ns02 is a mirror of ns01. To enable DNSSEC I set "Is mirror of Server" to None. When I want to add an already existing domain as a secondary domain I get the error message that that domain is already existing on the server. In the bind configuration in named.conf.local I see that zone as a master and as a slave. In the database of ISPConfig on ns02 I see that zone in the tables dns_soa and dns_rr.
    Is there an option to remove the mirror configuration from ns02? Or is there another way? Are these two tables the only tables which have the configuration for mirrored dns-zones?
    I can imagine that removing a mirror configuration is not only desirable for DNS, but also for other services.
     
  2. Frans Luteijn

    Frans Luteijn New Member

    IT would be nice if someone replied to my questions.
    Could be a feature request for a future release?
     
  3. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    i've never tried removing a mirror server, so not sure about this..
    i would imagine that you don't want to completely remove the server, re-install / wipe the ispconfig user configs on it and then add it again.
    i'd assume that having removed the ispconfig mirroring from this server, it effectively has no user configs applied to it in the master database, you could try running an ispconfig resync for all services on that server, that might remove all the dns zone info, records etc from the slave servers (ns02) database ( and thus the config files). giving you an effectively blank ispconfig dns server to start adding the secondary zones to.
     
  4. Frans Luteijn

    Frans Luteijn New Member

    As I remember I tried doing this, resyncing, but as far as I remember I wasn't able to select ns02.
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    You have to select ns1 when you want to resync ns2 (in case ns2 is a mirror of ns1).
     
  6. Frans Luteijn

    Frans Luteijn New Member

    That's the whole problem, ns02 is not a mirror of ns01 anymore.
     
  7. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Unlinking a mirror is not really supported. Best thing to do now is remove the server from ISPConfig and completely reinstall the OS, then re-add it with the same hostname.
     
  8. Frans Luteijn

    Frans Luteijn New Member

    This is what I've done and it seemed to work:
    In the database on ns02 (not to be confused with ns01) I've executed the command:
    "select * from dns_soa where origin = 'domain.tld.';"
    Side note: better would have been: "select id from dns_soa where origin = 'domain.tld.';"
    Next I've executed: "select * from dns_rr where zone = id;" where id is the same number you've got from the previous command, just to be sure you've got the right zone.
    The next commands were similar, but removing the records:
    "delete from dns_soa where origin = 'domain.tld.';"
    "delete from dns_rr where zone = id;"
    On the first command only one record should be delete, on the next command the number of records should be the same as the number of records on that zone.
    After adding that zone in ISPConfig as a Secondary DNS-zone that zone was removed from named.conf.local as master and added as a slave. I've done this for every zone in the configuration.
    Or someone can just be quick and only executes the following commands:
    "delete from dns_soa;"
    "delete from dns_rr;"
    and then add the secondary DNS-zones. In the mean time that nameserver is not responsive for those zones until they're added as secondary DNS-zone.
    Maybe this is not something for everyone, because making errors here can de disastrous. But on the other hand, this is not the master database and one should rely on backups and in case of a major error ISPConfig could be installed again.
    The only thing I'm not sure of is if I've removed all references in the database, but as far as I've found I've done that with those two delete commands.
     
  9. t.roijers

    t.roijers Member

    Hello,
    I wanted to change the DNS servers from mirror to multiple server setup (for DNSSEC), so on the secondary nameserver (ns2) i disabled "is mirror from ns1". When i did this both nameservers no longer responded so i had to enable mirroring again. Do i need te reinstall both nameservers?, Or is not responding by disabling mirroring not the expected outcome?
     
  10. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    This thread talks about how removing the "is mirror of" does not lead to a working system.
    This thread has info on what to do instead.
    Don't do that.
    I believe disabling mirroring is not supported in ISPConfig, that is disabling does not lead to a working system. You can disable mirroring, but set up a working replacement server first, disable mirroring then.
    I would install a new host, name it ns3, add it to ISPConfig multiserver setup and create secondary DNS zones there. Then disable mirroring for ns2 and remove it from ISPConfig setup if name service was the only thing it was used for.
     
    ahrasis likes this.

Share This Page