SOA coming up as localhost.localdomain


I've read through the slave configuration documentation and was able to follow that no problem. However when looking through my zones I noticed that my SOA is wrong.

$ttl 38400 @ IN SOA localhost.localdomain. ( 1376046439 10800 3600 604800 38400 ) @ IN NS localhost.localdomain.

There must be something in virtualmin that is generating this because when I generate a zone using webmin it looks more the way I want to see it

$ttl 38400 IN SOA ( 1376047447 10800 3600 604800 38400 ) IN NS

Is this indicative of a larger issue? I'm hoping I don't have to reinstall but don't mind if that is what's necessary.

One follow-on question is: In the end I'd like to have the following:

2 name servers (slaves)

all of my virtualmin servers will update the salves and that is how the rest of the world sees the records. I'd rather not have people resolving to the virtualmin boxes directly. Do you see a problem with that WRT virtualmin and or DNS?

Thanks, Aaron




I don't think you need to re-install. :) First we need to find out why Virtualmin uses that hostname in the SOA record. One place that comes to mind where the SOA data is configured is in the server templates, section "BIND DNS Domain". In "Master DNS server hostname", what do you have configured there?

When you open an SSH shell and enter the following, what do you get?

hostname -f

Having multiple slaves and not using the Virtualmin master as externally visible nameserver is all okay, it's often done that way and it's called "hidden master". It needs to be set up properly though, since by default Virtualmin will try to enter its own host as (one of the / the master) nameserver into zones. Namely you need to set the mentioned "Master DNS Server hostname" correctly, and uncheck the "Add nameserver record for this system" checkbox just above it.

Howdy -- no, that's not a large issue. But, it may mean your hostname is set to "localhost.localdomain.

You may want to update your hostname to your preferred name (something in the host.domain.tld format).

However, what you could also do is go into System Settings -> Server Templates -> Default -> BIND DNS Domain, and there, you can set "Master DNS server hostname" to what you want being used for the SOA records.

That will only change new DNS zones though -- to change existing zones, you can go into Webmin -> Servers -> BIND DNS Server, and in there you can edit the DNS Zone, and update the SOA record.

Regarding your last question about not using the Virtualmin server for resolving DNS -- that's no problem, what that means is that you'd just setup your two slave servers as nameservers, but not your Virtualmin server.

So whenever someone registers a domain, and adds the nameservers to it -- the nameservers they add should only be for your slave servers, there shouldn't be a nameserver that resolves to your Virtualmin server.

Hi Locutus,

Thanks a lot for the help! I figured a re-install would be drastic but I couldn't remember if I botched something in the virtualmin post-install. Still even if I had it shouldn't require a reinstall :)

My hostname is set properly now. What I did was register a separate domain for administrative purposes and I"ll manage that separately.

I did find the master DNS server hostname setting in the templates and that is where the localhost.localdomain was coming from. I've set that to my master DNS server and now my SOA's look good.

Thanks for the tip about adding nameserver record for this system and thanks for the help!



OK awesome! All of that makes perfect sense! The thing that escaped me was the server templates.

BTW is there a way to access the server templates directly through the command line? I'm sure there is so I'll look around some more :)

Thanks again for the help! I'm super stoked to get this all setup I'm really digging virtualmin and I decided to take cloudmin (for physical server) for a test ride!


BTW is there a way to access the server templates directly through the command line?

Yup! On the command line, type this command to see most of the options related to Server Templates:

virtualmin | grep template

OK seriously now I'm drooling! :)

This is awesome! Thanks!