Control Web Panel
WebPanel => CentOS-WebPanel Bugs => Topic started by: n8v8r on February 06, 2018, 11:07:44 AM
-
Following http://wiki.centos-webpanel.com/how-to-setup-name-servers for one IP settings
If you are using one IP then it should looks like:
ns1.demo.com --> 185.4.149.83
ns1.demo.com --> 185.4.149.83
In such case CWP (Edit Nameservers) is scripting the settings of named.conf zone with "zone ns1.demo.com" {type master;file "/var/named/ns1.demo.com.db";};
zone "ns1.demo.com" {type master;file "/var/named/ns1.demo.com.db";};
Which is a duplication named does not accept and complains about /etc/named.conf:LineN: zone 'ns1.demo.com': already exists previous definition: /etc/named.conf:LineN-1
If the second NS is left empty instead the CWP (Edit Nameservers) is scripting the settings of named.conf zone with zone "" {type master;file "/var/named/.db";};
which is basically empty and not accepted by named either /etc/named.conf:LineN: zone '': is not a valid name
Either way named.conf has to be cleaned manually afterwards. The expected behavior of CWP (Edit Nameservers) scripting would be:
- compare the strings of NS1 and NS2 and if a match not duplicate the first in named.conf, or
- if the second NS is left empty not to produce an empty zone in named.conf
-
Might be just a clerical error in the cited wiki article. If indeed 2 NS entries are mandatory then perhaps for single IP the wiki should read instead
If you are using one IP then it should looks like:
ns1.demo.com --> 185.4.149.83
ns2.demo.com --> 185.4.149.83
-
Just a typo :)
-
Sure, but to the uninitiated it could cause quite some headache. Perhaps it should be corrected and added that even with a single IP a parent NS(1) and child NS(2) are mandatory.
And perhaps the input mask in CWP should prevent an empty NS, whether parent or child. Which would help to mitigate errors