ISPC delete the main dns zone

Discussion in 'Installation/Configuration' started by MaxT, Dec 6, 2022.

Tags:
  1. MaxT

    MaxT Active Member HowtoForge Supporter

    When I start a new ISPC install I write the main zone "pri.host.domain.com" manually, and then I apply chattr +i. On the contrary, ISPC will delete this zone as soon any new change appears in a zone of any domain.

    In example, I have one vps with zone registers ns1, ns2 pointing to one ip 18.18.18.18.
    This is the main dns zone for "host.domain.com" (/etc/bind/pri.host.domain.com) :
    Code:
    $TTL        3600
    host.domain.com.       IN      SOA     ns1.domain.com. webmaster.domain.com. (
                            2020040607       ; serial, todays date + todays serial #
                            3600              ; refresh, seconds
                540              ; retry, seconds
                            2419200              ; expire, seconds
                            86400 )            ; minimum, seconds
    ;
    host.domain.com. 3600      NS        ns1.domain.com.
    host.domain.com. 3600      NS        ns2.domain.com.
    host.domain.com. 3600      A        18.18.18.18
    
    localhost 14400 A        127.0.0.1
    
    mail 3600 A       18.18.18.18
    www 3600 A        18.18.18.18
    
    host.domain.com. 3600 A        18.18.18.18
    host.domain.com. 86400      TXT        "v=spf1 mx a ~all"
    
    ns1 14400 A        18.18.18.18
    ns2 14400 A        18.18.18.18
    
    And this is the zone for the website, domain.com (/etc/bind/pri.domain.com):
    Code:
    $TTL        3600
    @       IN      SOA     ns1.domain.com. webmaster.domain.com. (
                            2021120502       ; serial, todays date + todays serial #
                            7200              ; refresh, seconds
                            540              ; retry, seconds
                            1209600              ; expire, seconds
                            3600 )            ; minimum, seconds
    ;
    
    domain.com. 3600      A          18.18.18.18
    ftp 3600      A          18.18.18.18
    localhost 14400      A          127.0.0.1
    mail 3600      A          18.18.18.18
    
    ns1 3600      A          18.18.18.18
    ns2 3600      A          18.18.18.18
    
    ns1.domain.com. 3600      A          18.18.18.18
    ns2.domain.com. 3600      A          18.18.18.18
    
    www 3600      A          18.18.18.18
    
    domain.com. 3600      MX     10  mail.domain.com.
    domain.com. 3600      NS         ns1.domain.com.
    domain.com. 3600      NS         ns2.domain.com.
    domain.com. 3600      TXT        "v=spf1 mx a ~all"
    
    This works well, although the file /etc/bind/pri.host.domain.com will be deleted by ISPC if it doesn't have read-only protection.

    When I go into ISPC -> DNS Zones, I cannot add a new zone for "host.domain.com" because I should choose one domain in the Zone(SOA) drop-down list, and here logically "host.domain.com" is missing. It only shows "domain.com"

    I suppose there is a way to configure it inside ISPC. Although i've never found how to do that.

    How you do it?
     
  2. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    ISPConfig dsn server is based database and yes that will overwrite the ones you manually created.

    You have to learn to create them inside ISPConfig which you already knew by now.

    I no longer maintain my own ISPConfig dns server so check the manual, or search this site's tutorial and forum or you can wait for proper response from other members.
     
    MaxT likes this.
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    Like @ahrasis mentioned, create the DNS zones in ISPConfig. Do not manually alter zone files managed by ISPConfig as this is neither useful nor necessary.

    You enabled the domain limit module, which means all domains you use must be added in client module, and you missed adding host.domain.com there, that's all. Or disable domain limit module under System > interface > main config if you don't need it.
     
    MaxT likes this.
  4. MaxT

    MaxT Active Member HowtoForge Supporter

    yes, it was the cause. Very easy to solve disabling the limits domain.
    Thank you:)
     
  5. MaxT

    MaxT Active Member HowtoForge Supporter

    and How you configure this aspect, if I can ask?
     
  6. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    I guess @ahrasis meant he runs DNS server somewhere else, not on his ISPConfig system. I think this needs no configuration, just choosing DNS service provider, like Internet service provider for example, or the hosting provider. Then doing the name service configurations there.
     
    MaxT likes this.
  7. MaxT

    MaxT Active Member HowtoForge Supporter

    ok, I understand.. I have seen some vps providers offers a DNS management after entering in their panels. I suppose this can be that tool. I always lose the time in configuring the own ns1 ns2 records... One day I will try that.
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    The only benefit of using an external provider is that you don't have to run your own DNS servers. Using an external provider is not faster, though, in most cases, even slower as you can create the whole DNS record set in ISPConfig by just entering the domain name and clicking on create DNS records if you prepared the DNS template correctly. With an external DNS provider, you have to log in there separately, and the systems that I've seen until now did not have easy templating abilities.
     
    MaxT likes this.
  9. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    Mostly true and the dns services especially the free ones are often limited as well so if you got a lot of entries to make or want to manage in local private network then maintaining your own dns servers is a good move.

    I am not in need of any of that currently so I am using cloudflare dns server for my domains instead, but with each of them have their own respective account so each may be managed separately.
     
    MaxT likes this.

Share This Page