Setting NS1, NS2, how to? Can't find it in manuals


I’ve setup Virtualmin, it’s running on IP address only. I’m completely lost about setting domain - to park any domain on server, I need nameservers, but how can I set them up :slight_smile:

I’ve domain registered with GoDaddy, and I want it to be a nameserver, ex.,, is there any manual about this or can I get some step by step help?



i would avoid running nameservers though unless it is for internal use.

at you’ll find a link to the modules documentation
bind should be installed. through webmin you can access the module under “servers”

I’m sorry, but I’m completely lost now.

I tried to do it, but it’s not possible, goDaddy doesn’t allow to change dns records.

Is there any help for newbies? Or can I get some support, thanks…

There are 2 things I want to do, but system doesn’t allow me (or I’m just doing it wrong)

  1. I heve one default IP address set, but I want to add more IPs to system which I already received from datacenter, I tried “System Settings>Shared IP Addresses”, but it’s not possible.

  2. when I have this ready, I want to use 2 IPs from these added, and create DNS with my domain name (,

Thanks in advance. I can offer some money for doing it for my, thanks…

Ronald’s method of adding IPs will work fine.

However, you said:

1) I heve one default IP address set, but I want to add more IPs to system which I already received from datacenter, I tried "System Settings>Shared IP Addresses", but it's not possible.

You don’t necessarily need to do anything to “add” them to your system–just use them when you need them. So, when you create a new virtual server, just choose to have it on its own IP and fill in the form.

But, if you’d rather the addresses be pre-existing, you can do that to, as Ronald said.

2) when I have this ready, I want to use 2 IPs from these added, and create DNS with my domain name (,

Ronald is on the right track with his registrar advice, but all of the A records are unnecessary if you’re going o have your own name servers. Running your own is the easiest to manage, since Virtualmin can manage the A records and MX records and everything else for you, once you make the registrar aware of your name server(s).

GoDaddy is extremely irritating when it comes to spinning up a new nameserver from scratch–your name server needs to already exist in some zone that is hosted on some other name server, because GoDaddy doesn’t have a field for filling in the IP address (like many registrars offer).

What this means is that you need to have another name server that is already working and you can add records to, and you need to add your new server it. Then you can give GoDaddy the address you’ve just created for your name servers for your new zone…once that one exists and is resolving you can change the GoDaddy glue records to point to the new ns names.

Confused yet? Yeah, me too. Go yell at GoDaddy for being a wee bit stupid.

Basically, you need an existing name server before you can create name servers for domain names hosted with GoDaddy. GoDaddy’s own free DNS hosting will probably work for this purpose, though, so you can probably spin it all up entirely from within GoDaddy’s interface.

But this is almost entirely outside of the scope of Virtualmin. Once your glue records are right at your registrar, you just need to create two NS records in your domain using the BIND module in Webmin…which I think is pretty easy, and documented in the Webmin wiki:

Adding records is covered here:

And the types of records are documented here:

Joe, out of curiosity, because I was convinced (after reading much documentation on the subject) that you need to register your nameservers (machines) at the domains registrar. Now my registrar doesn’t offer such service so I couldn’t (hence the A records)

I can however change the nameservers at my registrar for my main domain, but who is gonna know about them if they aren’t listed? Also to register the nameservers (machines), normally, you’ll need 2 of them in different networks.

I’m confused again :confused:
I think my confusion is found in nameserver as in a machine (and you’d have to pay a fee to get that machine listed somewhere as a nameserver) and nameserver as in the local BIND

For example:
my server is called
I can change the ns records for at my registrar to and and point them with the IP to my machine.
The ns1 and ns2 are running on but since isn’t listed as a nameserver, would that not become a problem?

The way I did it now also allowed me to point an A record at my registrar to a second server in a different network which is acting purely as a slave nameserver.

Or is listing the machines not necessary at all?

Under webmins modules - networking- Network Configuration-
click on network interfaces.
You will see your IP bound to eth0
You have to add an interface and call it eth0:1 - fill in the proper info like a different IP you got from the datacenter.

The eth0:1 will be a virtual interface.
Repeat this but name it eth0:2 and use another IP you received from the datacenter.

It will look like this
Name Type IP Address Netmask Activate at boot?
eth0 Ethernet Yes
eth0:1 Ethernet (Virtual) Yes
eth0:2 Ethernet (Virtual) Yes

click - Return to network configuration then click on - Host Addresses

I have added the 2 new IP’s to the HOST adresses , ns1 , ns2

Then you need to click "Apply configuration" NOTE: if you made a mistake, it is possible to loose connection to the server. So I advice to be careful and double check your settings 5x before hitting that button.

At the registrar you need to change and add the A records for you main domain.
In my case I have this:

A ->
A * ->
A ->
A ->
A ->
MX-5 ->

PTR -> is the systems name obviously.

hope that helps.
Oh and then you need to add to the servers template under -BIND dns domain- fill in in the empty big box:
${DOM}. 38400 IN NS
Note include the dot at the end of that line!

replace with the domain you are actually using :stuck_out_tongue: