Bind /etc/named.conf corrupted when renaming and working with domains

Hello Folks!

I noticed a more severe bug in virtualmin, it knocks down the nameserver bind due to making error in configuration file /etc/named.conf and therefore kills entire site after a server reboot and also prevent adding further domains / renames since named does not reload zones when renamed, maby due to this bug.

OS Centos5.5 and latest virtualmin GPL installed from install script, Backend openldap is yummed down, no source compiled appz. all from yum.

There is no "hacks" in the configuration, all is made by webmin/virtualmin.

We had to simulate some users activities on our coming site setrver for domains, to see that all worked as expected, at first glance it did. After restarting the server bind did not start again.

This is what happens (reproducing error, appairs allways). 1. As "root" create domain ing-steen.se, activating rndc (was not activated after virtualmin install scripts, should it not be that ?) and finally adding domain moholm.ing-steen.se 2. Login as moholm and change domain name to moholm.nu 3. Logout 4. Login as root and check bind configuration

Observation 1) Nameserver did not reload moholm.nu after renaming the domain! rndc reload moholm.nu rndc: 'reload' failed: not found

Observation 2) Running check bind config gives: The following errors were found in the BIND configuration file /etc/named.conf or referenced zone files .. /etc/named.conf:36: expected IP match list element near ';'

Ok, thats it, there is problems after the rename, the domain rename has failed to respect "additinally manually configured name servers" in a correct manner. There are two in this setup, added the server template, ns.calltoall.fi. and ns2.ing-steen.se.

cat /etc/named.conf options { directory "/etc"; pid-file "/var/run/named/named.pid"; allow-recursion { localnets; 127.0.0.1; }; };

zone "." { type hint; file "/etc/db.cache"; };

zone "ing-steen.se" { type master; file "/var/named/ing-steen.se.hosts"; allow-transfer { 127.0.0.1; localnets; 80.84.37.10; 80.84.34.132; }; }; key rndc-key { algorithm hmac-md5; secret "JCrxOigdGotGspzTKVsh0Q=="; }; controls { inet 127.0.0.1 port 953 allow { 127.0.0.1; } keys { rndc-key; }; }; zone "moholm.net" { type master; file "/var/named/moholm.net.hosts"; allow-transfer { 127.0.0.1; localnets; 80.84.37.10; ;; }; };

I am stuck, we cannot rollout virtualmin GPL

Status: 
Closed (fixed)

Comments

Hello Folks!

Maby it is not a bug after all, a bug only in the fact that a user could destroy the dns renaming domain.

I did enter the two DNS:es 80.84.37.10; 80.84.34.132 in the main domain ing-steen.se zonefile so they could be resolved correctly by virtualmin.

Then problem went away, no more garbelling of the /etc/named.conf file whatever stupid renames I do.

Maby it is a good idea to refuse "additinally manually configured name servers" if they do not resolve, I mean tell the user what is on it's way to happen before it makes trouble.

So just removing those additional nameservers fixed the problem?

That is surprising, as all this option does is add NS records to new domains for nameservers that you would setup manually.

Could you attach your named.conf file from when you are getting the "expected IP match list element" error from BIND?

Yes I removed the additional nameservers, removed the domains with garbelled entries. Then I did add the additional nameservers to the dns domain so they resolved correctly. Lastly I did add the domain removed, and YES it is now working.

Ok, I guess this is fixed then ..

Confirmed! Very many nice and nasty renames, also such ones with interrupted in the middle of sessions did not result in any corrupted file. Sorry for the noice, I just get very swetty having that experience. :-)

Automatically closed -- issue fixed for 2 weeks with no activity.