bind

When I create a new virtual server my dns doesn’t work until I delete it. The error pointed to tld.com.hosts. I compared it withe the rest of my prior working virtual servers and the difference was that it is adding my slave dns server address at the bottom line of the file:

IE:

$ttl 38400
@ IN SOA ns3.beef2.net. root.ns3.beef2.net. (
1243308217
10800
3600
604800
38400 )
@ IN NS ns3.beef2.net.
@ IN NS 12.10.108.39.
antishane.com. IN A 209.20.78.105
www.antishane.com. IN A 209.20.78.105
ftp.antishane.com. IN A 209.20.78.105
m.antishane.com. IN A 209.20.78.105
localhost.antishane.com. IN A 127.0.0.1
webmail.antishane.com. IN A 209.20.78.105
admin.antishane.com. IN A 209.20.78.105
mail.antishane.com. IN A 209.20.78.105
antishane.com. IN MX 5 mail.antishane.com.
antishane.com. IN TXT "v=spf1 a mx a:antishane.com ip4:209.20.78.105 ?all"
ns1.beef2.net

What setting have I changed in virtualmin that could cause this change in the generated dns hosts config file?

Check the Server Templates->BIND DNS Domain page.

Is this slave one Webmin manages for you (e.g. did you follow the slave auto-configuration guide in the Documentation)? Or is it one you manage yourself?

Anyway, I’m guessing it’s something in Server Templates.

Virtualmin didn’t create the extraneous “notify yes;” line. You’ll just want to remove it.

oh, and here is the error restarting bind:

Failed to start BIND : Starting named: Error in named configuration: /etc/named.conf:158: ‘notify’ redefined near ‘notify’ [FAILED]

OK, so Virtualmin doesn’t add it by default. You can certainly configure Virtualmin or Webmin incorrectly to make it do so. Flexibility means you can break things in all sorts of wonderful ways if you try hard enough. :wink:

There are a couple of places where you could have added that. Server Templates seems the most likely. But, it could also be in the Webmin BIND module somewhere…not sure where, exactly, though, as I don’t spend much time there.

If, in the unlikely circumstance, you haven’t actually added that line to Server Templates or in any of the free text fields in the Webmin BIND module, and Virtualmin is creating zones with extraneous information it’d be a bug. But, this is the first we’ve heard of it (and we’d definitely hear about something like this really fast; since it prevents BIND from starting).

Sure. I totally know I broke it :slight_smile: I really appreciate the help and I learn from it. You guys rock!

Awesome. Everything works if you let it. :wink:

Yes, the slave server is managed by Webmin. In the Server Template > BIND DNS records for new domains field I find this:


BIND DNS records for new domains:

(text box field) ns1.beef2.net

  • Add above to automatically generated records

I cleared that field and that took care of that. Thank you. There is one more problem, when the named.conf file is created it is adding in a bonus line of "notify yes;" on the next to the last line of the code block -

[code:1]zone "tld.com" {
type master;
file "/var/named/tld.com.hosts";
notify yes;
allow-transfer {
slaves;
};
also-notify {
12.10.108.39;
};
notify yes;
};[/code:1]

which throws this error when bind is started -


Failed to start BIND : Starting named: Error in named configuration: /etc/named.conf:147: ‘notify’ redefined near ‘notify’ [FAILED]


removing it makes bind happy (we must have happy bind). where would i look to find this setting in virtualmin?

Yes, the slave server is managed by Webmin. In the Server Template > BIND DNS records for new domains field I find this:


BIND DNS records for new domains:

(text box field) ns1.beef2.net

  • Add above to automatically generated records

I cleared that field and that took care of that. Thank you. There is one more problem, when the named.conf file is created it is adding in a bonus line of "notify yes;" on the next to the last line of the code block -

[code:1]zone "tld.com" {
type master;
file "/var/named/tld.com.hosts";
notify yes;
allow-transfer {
slaves;
};
also-notify {
12.10.108.39;
};
notify yes;
};[/code:1]

which throws this error when bind is started -


Failed to start BIND : Starting named: Error in named configuration: /etc/named.conf:147: ‘notify’ redefined near ‘notify’ [FAILED]


removing it makes bind happy (we must have happy bind). where would i look to find this setting in virtualmin?

Yes, the slave server is managed by Webmin. In the Server Template > BIND DNS records for new domains field I find this:


BIND DNS records for new domains:

(text box field) ns1.beef2.net

  • Add above to automatically generated records

I cleared that field and that took care of that. Thank you. There is one more problem, when the named.conf file is created it is adding in a bonus line of "notify yes;" on the next to the last line of the code block -

[code:1]zone "tld.com" {
type master;
file "/var/named/tld.com.hosts";
notify yes;
allow-transfer {
slaves;
};
also-notify {
12.10.108.39;
};
notify yes;
};[/code:1]

which throws this error when bind is started -


Failed to start BIND : Starting named: Error in named configuration: /etc/named.conf:147: ‘notify’ redefined near ‘notify’ [FAILED]


removing it makes bind happy (we must have happy bind). where would i look to find this setting in virtualmin?

it totally did. i just added another tld.info and here is the resulting code block from named.conf

[code:1]zone "tld.info" {
type master;
file "/var/named/tld.info.hosts";
notify yes;
allow-transfer {
slaves;
};
also-notify {
12.10.108.39;
};
notify yes;
};[/code:1]

it totally did. i just added another tld.info and here is the resulting code block from named.conf

[code:1]zone "tld.info" {
type master;
file "/var/named/tld.info.hosts";
notify yes;
allow-transfer {
slaves;
};
also-notify {
12.10.108.39;
};
notify yes;
};[/code:1]

Ok, it was in Virtualmin > System Settings > Server Templates > BIND DNS domain:

Additional named.conf directives for new zones
( ) None (*) Directives below …

[code:1]notify yes;
allow-transfer {
slaves;
}; [/code:1]

Not really sure how that got added in there, but I removed the notify yes;, added a new tld and it works great now. Perhaps when I went 4 wheeling this weekend I may have bumped my head, inadvertently jarring some resin loose. :slight_smile:

Thanks Joe

Ok, it was in Virtualmin > System Settings > Server Templates > BIND DNS domain:

Additional named.conf directives for new zones
( ) None (*) Directives below …

[code:1]notify yes;
allow-transfer {
slaves;
}; [/code:1]

Not really sure how that got added in there, but I removed the notify yes;, added a new tld and it works great now. Perhaps when I went 4 wheeling this weekend I may have bumped my head, inadvertently jarring some resin loose. :slight_smile:

Thanks Joe