BIND DNS CONFIGURATION AND VIRTUAL SERVER CREATION

12 posts / 0 new
Last post
#1 Fri, 11/14/2008 - 04:04
adlsrl

BIND DNS CONFIGURATION AND VIRTUAL SERVER CREATION

Hi, i've configured Bind Server in Webmin to create zone files as i want, with custom records and a template file. I've tried it in webmin creating a new master dns zone and it works. But if i create a new virtual server in virtualmin professional zone files are created as like as the default and not with my configuration. What can i do to resolve this problem? Thanks.

Fri, 11/14/2008 - 05:01
andreychek

Hrm, I suspect a lot of the Virtual Server defaults are being pulled from what's defined in the Server Templates.

When you log into Virtualmin, go into System Settings -> Server Templates -> DNS for Domain, and try making changes there and see if that helps.
-Eric

Fri, 11/14/2008 - 05:21 (Reply to #2)
adlsrl

I've tried to configure it in Server Templates, like the image attached . When I save the configuration give me this error:
"Failed to save server template : An NS record for the domain must exist in the template". Why?

Fri, 11/14/2008 - 05:23 (Reply to #3)
adlsrl

Sorry, here the image.

Fri, 11/14/2008 - 05:26 (Reply to #4)
adlsrl

sorry again, i post it here:
$ORIGIN .
$TTL 86400 ; 1 day
$DOM IN SOA "myhost". "mymail".
(
2002121200 ; serial
86400 ; refresh (1 day)
1800 ; retry (30 minutes)
605000 ; expire (1 week 3 minutes 20 seconds)
86400 ; minimum (1 day)
)
NS "master dns".
NS "slave dns".
MX 10 "server mail".
$ORIGIN $DOM.
imap CNAME "server mail".
pop3 CNAME "server mail".
smtp CNAME "server mail".
www A ip server site

Fri, 11/14/2008 - 10:10 (Reply to #5)
andreychek

Yeah, the forum software isn't always thrilled about attachments, especially on Fridays. Joe's working on it though :-)

Could you email me a copy of your DNS information (including the real IP's, CNAME's, and such)?

I'd like to see the actual syntax in use there.

You can email it to eric@virtualmin.com -- include a link to this post if you can. Thanks!
-Eric

Mon, 11/17/2008 - 06:35 (Reply to #6)
andreychek

We're discussing this over email.

As he mentioned above, he's getting the error -- "Failed to save server template : An NS record for the domain must exist in the template" -- when creating a Virtual Server.

He has "Use only the records above" checked, meaning all the DNS records need to be provided in his template.

Looking in the Virtualmin source, it looks like that error will come up when either the NS record is missing, or the SOA record.

After viewing the zone file, I suspect there's a non-printable character in the SOA record line that's hindering Virtualmin's ability to read the record properly. That line would just need to be deleted and re-written.
-Eric

Mon, 11/17/2008 - 22:08 (Reply to #7)
adlsrl

This is the way i use to resolve the problem:
1. You have two "$ORIGIN" lines, you may want to delete one or both

2. I think there's a problem with your SOA line. I think there's a non-printable character in it that's causing a problem, preventing Virtualmin from reading it correctly.

So, try deleting this:

> $DOM IN SOA "dns server name". "email".

And in it's place, add this:

@ IN SOA "dns server name". "email".

I use the option "Use only the records above" because Virtualmin don't use the Bind default that i 've configurated and test before.
Indeed i create new dns zones like i want to using the Bind in webmin.
So i want to know if i made some mistakes in the configuration.

This is eric's answer by email:
I think I see what you're saying -- you've made some changes by going into Webmin -> Servers -> BIND DNS Server, and the changes you've added in there aren't being used when Virtualmin creates a Virtual Server?
I guess I'd need some specifics about what isn't showing up or working correctly...
I may also need to enlist the help of Jamie.

So, what should I post here to help you solve the problem?
Thanks.

Tue, 11/18/2008 - 05:58 (Reply to #8)
andreychek

Well, can you give a specific example of what you'd like to have working that currently don't work?

There's a lot of goodies in the Webmin/BIND configuration, and some of them I'd expect to effect Virtualmin, others I wouldn't.

So if you can provide some more details of what you'd like to setup, we can try and figure out if there's a bug, or if it's a feature request :-)

Thanks!
-Eric

Tue, 11/18/2008 - 07:33 (Reply to #9)
adlsrl

So, I hope to be clear. I configure Bind from menù WebMin>Server>Bind DNS Server to create zone files like this:
$ttl 86400
pippo.it. IN SOA "name of the server". "email". (
1227027259
86400
1800
605000
86400 )
pippo.it. IN NS "name of the server".
pop3. IN CNAME "name of the server"
imap. IN CNAME "name of the server"
smtp. IN CNAME "name of the server"
www. IN A "public ip server"
pippo.it. IN NS "name of the server".
pippo.it. IN MX 10 "name of the server".

It works well, but when I create a new Virtual Server from menù Virtualmin>Create Virtual Server, the zone file is created like this:
$ttl 86400
@ IN SOA "name of the server". "email". (
1227027823
86400
1800
605000
86400 )
@ IN NS "name of the server".
pippo.it. IN A 192.168.1.10
www.pippo.it. IN A 192.168.1.10
ftp.pippo.it. IN A 192.168.1.10
m.pippo.it. IN A 192.168.1.10
localhost.pippo.it. IN A 127.0.0.1
webmail.pippo.it. IN A 192.168.1.10
admin.pippo.it. IN A 192.168.1.10
pippo.it. IN TXT "v=spf1 a mx a:pippo.it ip4:192.168.1.10 ?all"

I think this is the default.
Then i tell you the problem and after your suggestion I configure Vitualmin Server Template to create Bind zone files with the option "Use only the records above" and this template:
$ORIGIN $DOM.
$TTL 86400 ; 1 day
@ IN SOA "name of server". "email".
( 2004102702 ;serial
86400 ;refresh
1800 ;retry
605000 ;expire
86400 ;TTL
)
@ IN NS "name of server".
@ IN NS "name of server".
@ IN MX 10 "name of server".
pop3. IN CNAME "name of server".
imap. IN CNAME "name of server".
smtp. IN CNAME "name of server".
www. IN A "server ip"

I ask you why Virtualmin don't use the Bind configuration i made in WebMin? Do I made any mistake? There is something else to configure?

Thanks.

Tue, 11/18/2008 - 08:18 (Reply to #10)
Joe
Joe's picture

Currently, Virtualmin has it's own template for BIND records that is completely separate from Webmin's BIND module. This was done intentionally, as Virtualmin can have multiple templates, and the records you want for web hosting may be different from other domains.

So did your third template below work OK? If not, what was going wrong exactly?

--

Check out the forum guidelines!

Wed, 11/19/2008 - 06:38 (Reply to #11)
adlsrl

Yes it works. I just want to know how is the working relationship between the virtualmin and webmin for Bind Dns Server. Thank you for explanation. Have a nice day.

Topic locked