14 posts / 0 new
Last post
#1 Mon, 05/25/2009 - 19:31
antishane

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?

Mon, 05/25/2009 - 22:14
Joe
Joe's picture

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.

--

Check out the forum guidelines!

Sun, 06/07/2009 - 07:56 (Reply to #2)
antishane

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?

Sun, 06/07/2009 - 07:56 (Reply to #3)
antishane

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?

Sun, 06/07/2009 - 07:56 (Reply to #4)
antishane

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?

Sun, 06/07/2009 - 07:56 (Reply to #5)
antishane

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]

Sun, 06/07/2009 - 07:56 (Reply to #6)
antishane

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]

Sun, 06/07/2009 - 07:56 (Reply to #7)
antishane

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. :)

Thanks Joe

Sun, 06/07/2009 - 07:56 (Reply to #8)
antishane

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. :)

Thanks Joe

Tue, 05/26/2009 - 06:15
Joe
Joe's picture

Virtualmin didn't create the extraneous "notify yes;" line. You'll just want to remove it.

--

Check out the forum guidelines!

Tue, 05/26/2009 - 06:26
antishane

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]

Tue, 05/26/2009 - 06:42 (Reply to #11)
Joe
Joe's picture

OK, so Virtualmin doesn't add it <i>by default</i>. 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. ;-)

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).

--

Check out the forum guidelines!

Tue, 05/26/2009 - 06:48 (Reply to #12)
antishane

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

Tue, 05/26/2009 - 07:27
Joe
Joe's picture

Awesome. Everything works if you let it. ;-)

--

Check out the forum guidelines!

Topic locked