create DNS zone manually

Discussion in 'ISPConfig 3 Priority Support' started by ganewbie, Dec 20, 2019.

  1. ganewbie

    ganewbie Member HowtoForge Supporter

    Hello,
    The perfect server Debian 10, apache.
    For whatever reason, creating PTR record broke, no idea why but it could have happened through some updates.
    Now, we manage to add a zone and edit the file /etc/bind/named.conf.local
    Until here no issue, but once you edit any DNS zone by any means, it seems that ISPconfig edits the file /etc/bind/named.conf.local and remove the addition we have done for the PTR.
    Is there a way to avoid editing the file so we avoid any interruptions.
    Thanks,
     
  2. florian030

    florian030 ISPConfig Developer ISPConfig Developer

    ispconfig stores the zones in this file. either your add your "manual" zone to ispconfig or move the settings for this zone to a new file and include the new file in bind (/etc/bind/named.conf)
     
    ganewbie likes this.
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    Please explain which exact problem you have with creating the PTR record in ISPConfig.
     
    ganewbie likes this.
  4. ganewbie

    ganewbie Member HowtoForge Supporter

    Thanks a million Florian,
    1- Created /etc/bind/named.conf.custom and added the zone that has been done outside of ISPCONFIG panel.
    2- Added /etc/bind/named.conf.custom to a new include line in /etc/bind/named.conf
    3- ReSync ISPconfig3, the zone got deleted from the as originally explained but my custom link stayed solid.
     
  5. ganewbie

    ganewbie Member HowtoForge Supporter

    Hi Till,
    I am not sure what is happening but the zone is correct as the manually added one but for some reason it gets marked by err at the end. The interesting point is that it used to work. It seems that ISPConfig3 is applying some checks and if it does not match the expected result, it marks it as err.
    Here is the situation.
    We own our IPs from Arin and we are authorized to issue a PTR from Datacenter provider.
    Code:
    ;
    ; BIND reverse data file for local loopback interface
    ;
    $TTL    604800
    @       IN      SOA     authorithation.dns.datacenter.com. support.domain.tld. (
                            200            ; Serial
                            7200           ; Refresh
                            540            ; Retry
                            604800         ; Expire
                            3600 ) ; Negative Cache TTL
    ;
    x.y.z.in-addr.arpa.      NS        authorithation.dns.datacenter.com.
    w     IN      PTR     s3.clientdomain.tld.
    "w" is the last octat of the IP
    the IP we are authorizing up is "z.y.x.w"
    Kindly let us know if we should add it as a bug.
    Thanks for the great support,
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    ispconfig marks it as .err file when the named-checkzone command which belongs to BIND reports an error. Please try to use named-checkzone to test the file to see which error it reports.
     
    ganewbie likes this.
  7. ganewbie

    ganewbie Member HowtoForge Supporter

    Thanks for the quick response,
    I am more confused now as there is no error.
    Code:
    named-checkzone x.y.z.in-addr.arpa pri.authorithation.dns.datacenter.com.err
    zone x.y.z.in-addr.arpa/IN: loaded serial 2019122010
    OK
    It seems OK, not sure why it considers this as an error?
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

  9. ganewbie

    ganewbie Member HowtoForge Supporter

    Hi Again Till,
    Although I can restart the DNS zone when I do the file manually but the log is showing that it is failing. Not sure if I am reading the log correctly. In any case here you are.
    Code:
    21.12.2019-10:24 - DEBUG - Writing BIND domain file failed: /etc/bind/pri.authorithation.dns.datacenter.com /etc/bind/pri.authorithation.dns.datacenter.com:10: ignoring out-of-zone data (x.y.z.in-addr.arpa) zone authorithation.dns.datacenter.com/IN: has no NS records zone authorithation.dns.datacenter.com/IN: not loaded due to errors.
    21.12.2019-10:24 - WARNING - Falsche Anfrage / Wrong QuerySQL-Query = INSERT INTO sys_log (server_id,datalog_id,loglevel,tstamp,message) VALUES (1, '2696', 'LOGLEVEL_WARN', UNIX_TIMESTAMP(), 'Writing BIND domain file failed: /etc/bind/pri.authorithation.dns.datacenter.com /etc/bind/pri.authorithation.dns.datacenter.com:10: ignoring out-of-zone data (x.y.z.in-addr.arpa) zone authorithation.dns.datacenter.com/IN: has no NS records zone authorithation.dns.datacenter.com/IN: not loaded due to errors.') -> 1366 (Incorrect integer value: 'LOGLEVEL_WARN' for column `dbispconfig`.`sys_log`.`loglevel` at row 1)
    21.12.2019-10:24 - DEBUG - Reason for Bind restart failure: /etc/bind/pri.authorithation.dns.datacenter.com:10: ignoring out-of-zone data (x.y.z.in-addr.arpa)
    zone authorithation.dns.datacenter.com/IN: has no NS records
    zone authorithation.dns.datacenter.com/IN: not loaded due to errors.
    21.12.2019-10:24 - WARNING - Falsche Anfrage / Wrong QuerySQL-Query = INSERT INTO sys_log (server_id,datalog_id,loglevel,tstamp,message) VALUES (1, '2696', 'LOGLEVEL_WARN', UNIX_TIMESTAMP(), 'Reason for Bind restart failure: /etc/bind/pri.authorithation.dns.datacenter.com:10: ignoring out-of-zone data (x.y.z.in-addr.arpa)\nzone authorithation.dns.datacenter.com/IN: has no NS records\nzone authorithation.dns.datacenter.com/IN: not loaded due to errors.') -> 1366 (Incorrect integer value: 'LOGLEVEL_WARN' for column `dbispconfig`.`sys_log`.`loglevel` at row 1)
    21.12.2019-10:24 - DEBUG - Writing BIND named.conf.local file: /etc/bind/named.conf.local
    21.12.2019-10:24 - DEBUG - Processed datalog_id 2696
    21.12.2019-10:24 - DEBUG - Calling function 'rr_update' from plugin 'bind_plugin' raised by event 'dns_rr_update'.
    21.12.2019-10:24 - DEBUG - safe_exec cmd: named-checkzone 'authorithation.dns.datacenter.com.' '/etc/bind/pri.authorithation.dns.datacenter.com' - return code: 1
    Thanks for the great support
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, so the .err file must contain wrong data when BIND reported this:

    /etc/bind/pri.authorithation.dns.datacenter.com:10: ignoring out-of-zone data (x.y.z.in-addr.arpa) zone authorithation.dns.datacenter.com/IN: has no NS records zone authorithation.dns.datacenter.com/IN: not loaded due to errors.

    Seems as if a NS record for authorithation.dns.datacenter.com is missing.

    The pathname in the error message does not contain .err because that's the path before ISPConfig renamed it.
     
    ganewbie likes this.
  11. ganewbie

    ganewbie Member HowtoForge Supporter

    Thanks Till, I agree with your analysis but how do you explain when you run name check againest the file ends with err it returns OK?
    Why it works and resolve properly when I created the file manually?
    It is a mystery that I cannot explain.
    Cheers,
     
  12. ganewbie

    ganewbie Member HowtoForge Supporter

    Thanks Till, I agree with your analysis but how do you explain when you run name check againest the file ends with err it returns OK?
    Why it works and resolve properly when I created the file manually?
    It is a mystery that I cannot explain.
    Cheers,
     

Share This Page