two NS instead of one, same VPS

Hello.

I have a VPS with 2 IP addresses, and even though this is considered bad, I’d like to configure my domains so that the name servers are the two IPs of my VPS, at least for a start.

The thing i’m having problems with is configuring DNSs in Virtualmin correctly (i’m using the GPL version). All my virtual servers have only 1 NS entry in virtualmin, but i’d like to change that to two for all these sites (make them default…).
Also, currently the NS record is to primary.mydomain.com (my FQDN), but i’d like that to be ns1.mydomain.com and another one to ns2.mydomain.com.
So basically now I have something like this in all my domains:
@ IN SOA primary.mydomain.com. root.primary.mydomain.com. (
1238265142
10800
3600
604800
38400 )
@ IN NS primary.mydomain.com.

And i’d like to make it so all these domains have TWO name servers set up and that they are ns1.mydomain.com and ns2.mydomain.com - these two will have different IPs.

I’m also wondering what else I’d have to change if mydomain.com’s NS were also ns1.mydomain.com and ns2.mydomain.com - if my registar can provide me with glue records.

Also a side question, how can i make Virtualmin recognise both my IP addresses (currently it only ‘knows’ about the first one)?

Thank you!

Post edited by: mrbrdo, at: 2009/03/28 14:11<br><br>Post edited by: mrbrdo, at: 2009/03/28 14:28

Howdy,

In System Settings -> Server Templates -> Default Template -> BIND DNS Domain, you’ll want to tweak both “Master DNS server hostname” (which you can set to ns1.domain.com), and then add "ns2.domain.com to “Additional manually configured nameservers”.
-Eric

Thanks for such a quick reply!
I think this was exactly what i needed. I can’t say if it works yet, because i need to contact my registar to make the glue records first (or point my NSs correctly), but i’ll drop by again if it doesn’t.

PS: for anyone reading this, when you open the template you have to click the next button a few times to get to the DNS stuff, just thought i should mention, took me a while to figure out :wink:

Oh, as an aside, you may have to setup ‘A’ records for ns1.domain.com and ns2.domain.com in the “domain.com” DNS settings (in Services -> DNS Domain -> Address). I know I had to do that with GoDaddy, for example.

Have a good one :slight_smile:
-Eric

Yes i will keep that in mind. I will try hosting the NSs for "domain.com" with the registar and tell them to add the A records, otherwise I will ask them to provide the glue and host the NSs myself.

your registrar adds your nameserver for your domain, you add the glue records on your server for that domain.
you can also add the ns1 and ns2 with IP’s in your networking module, at least that’s what I did.

Networking - Network Configuration - Host Addresses
and I’ve added them to the Network Interfaces
But since you are on VPS Im not sure if that is necessary

As far as I knew, glue is stored by the registar (since people cannot know what my server is, they can only get data from the registar itself). Besides the domain name of the NS the registar must then also hold the glue, if the NS is a subdomain of the domain it’s the NS for.
Or have I misunderstood you?

this is how I have it.
A domain at the registrar has my 3 nameservers. The registrar tells the world where to find my (name)servers
Now all the records are managed by my server including A records for the ns1, ns2 and ns3

resulting in:

Glue for NS records OK.
When I asked your nameservers for your NS records they also returned the A records for the NS records. This is a good thing as it will spare an extra A lookup needed to find those A records.