2nd ns zone???

I’ve installed Virtualmin using install.sh and everything is default.
Now i need to specificate a 2nd ns zone for every domain.
For example as first ns i’ve “namserver.server.com” and secondary should be “namserver.server2.com”.
how can i do this? i’ve to do for every domain in /etc/bind/mydoain.com.hosts ?




For new domains, that’s something you can setup within the Server Templates.

In System Settings -> Server Templates -> Default -> BIND DNS Domain, you can set “Additional manually configured nameservers” to include the secondary servers.

For existing domains, you can either edit Services -> DNS Domain and add the new NS record there, or you can use the command line tools to do so.

For example usage of the command line tools, you can type “virtualmin modify-dns”.


ok, thanks for help, but i need 1 thing more. i need to creare my own SOA records into file /etc/bind/domain.com.hosts. so i’ve found, inside System Settings -> Server Templates -> Default -> BIND DNS Domain: -> BIND DNS records for new domains. so, in that form what can i write to genereate a SOA as: YearMonthDayNumoperation (2007072203)?
how can i generate a NUMBER?
thanks, adding this line, will be replaced only SOA value or the entire .hosts file?


Hrm, something isn’t quite right if you need to manually add SOA records, that should be done automatically for you.

Unless that’s really what you wanted :slight_smile:

I’m not entirely sure what would even cause that, though if I had to guess, I’d guess it was related to the “Use only the records above” option being set underneath “BIND DNS records for new domains” on the BIND DNS Domain template page.

If you really wanted to be able to set your own SOA records, I’m honestly not sure how you’d generate a number, I don’t see a way to get that at the moment.


imy ISP, in italy, told me that i’ve to do it for domains. For .com there is not the problem, but for .it domain, is that problem. Can i tell the name of ISP here just to see if someone has had some similar problem? ISP is in italy, but big in europe.


country specific domains usually require not only 2 dns servers but also that those 2 server are on different subnets.

i don’t think you need to create the SOA yourself. Your zone file just needs to adhere to your country specific rules. It’s the same for .fr, .nl, .es and other European countries ( i don’t know about non-European)

Let Virtualmin create the records for you, just make sure you have 2 different subnets for the nameservers, like and

my 2 cts

what do you mean with “let virtualmin create the records for you”.
i mean that untill 2 day ago i just used only 1 dns, the dns of my server. then the ISP told me to use a second one, so i’ve added it as other ns in dns configuration for every domain and then i’ve setted up:
“Additional manually configured nameservers”: secondarydns.domain.net
and then:
“Notify slaves of changes” to Yes

The primary and secondary dns are in 2 different subnets. so is ok in this way?


so is ok in this way?

let virtualmin create the records for you
I meant don’t go creating your own SOA numbers. If your BIND is configured correctly, Virtualmin will create the proper zone-files.