Name service secondary zones, any script to set them up?

Discussion in 'ISPConfig 3 Priority Support' started by Taleman, Feb 25, 2021.

  1. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    I'm testing moving from mirrored name servers to using secondary zones. Seems it is quite a lot of work to add secondary zone for every zone I have. Has some kind soul already made a script to create secondary zone for every existing dns zone on the server?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Such a script might exist, but I'm not aware of one.
     
  3. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

  4. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    If there is any, I would have thought you'd be the one @Taleman since you deal a lot with dns server. I have planned for setting up dns servers but that may not involve any migration. Perhaps, ISPConfig developers can make and sell that script. Anyway, good luck.
     
  5. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    I plan to scipt in SQL IP-number changes, that is within my database abilities. I did that last time when migrating. But adding secondary zone is too complicated for me to do in the database, and I suspect it should be done using ISPConfig API so ISPConfig can do what it needs to do for the secondary zone.
    For the rest I just sit down and work through all the zones.
     
  6. atle

    atle Member HowtoForge Supporter

    Using the API is probably the right way to go.
    dns_zone_get returns enough information to create the zone and the let axfr do the transfer of the content of the zone. This is what
    dns_zone_get returns:
    Code:
    Array
    (
        [response] => Array
            (
                [id] => 9
                [sys_userid] => 7
                [sys_groupid] => 7
                [sys_perm_user] => riud
                [sys_perm_group] => ru
                [sys_perm_other] =>
                [server_id] => 1
                [origin] => blogg.click.
                [ns] => ns1.ic.etableraweb.com.
                [mbox] => hostmaster.blogg.click.
                [serial] => 2021030708
                [refresh] => 7200
                [retry] => 540
                [expire] => 604800
                [minimum] => 3600
                [ttl] => 3600
                [active] => Y
                [xfer] => 159.69.30.161
                [also_notify] => 159.69.30.161
                [update_acl] =>
                [dnssec_initialized] => N
                [dnssec_wanted] => N
                [dnssec_algo] => ECDSAP256SHA256
                [dnssec_last_signed] => 0
                [dnssec_info] =>
            )
    
        [success] => 1
    )
    Example script here, https://git.ispconfig.org/ispconfig...lop/remoting_client/examples/dns_zone_get.php
    To get all zones, enter

    Code:
    $client->dns_zone_get($session_id,[]))
     
    Last edited: Mar 9, 2021
    ahrasis likes this.

Share This Page