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