New Setup, Nameserver confusion

Hi Everyone,

I’m in the process of setting up Virtualmin on Amazon EC2, I used the image provided for this and have everything up and running.

Now I’m lost with trying to add a domain I have registered at GoDaddy to my Virtualmin setup. I have added the virtual server for the domain but what are my name servers to fill in for Godaddy to point to my new Virtualmin server?

I have things working by using a 3rd party DNS provider and pointing to my elastic ip from Amazon… but can I take the 3rd party out of the equation and do everything through Virtualmin?

What I want in the end is to have 2 name server urls ns1.mainsite.com, ns2.mainsite.com - and have any future virtual servers I set up use the same two name servers.

Thanks for any help!

Wow, I was going to try and help you with this but I went to amazon and came back more cloudy than when I went.

Without being harsh and basically ignorant, between the clouds and elasticity and instances I kind of lost the platform that Virtualmin would be operating on. If I understand it correctly BIND would be under a subzone and you wouldn’t be setting any primary nameserver. I guess it’s the instances they talk about that really throw me.


>>Elastic IP Addresses
Elastic IP addresses are static IP addresses designed for dynamic cloud computing. An Elastic IP address is associated with your account not a particular instance, and you control that address until you choose to explicitly release it. Unlike traditional static IP addresses, however, Elastic IP addresses allow you to mask instance or Availability Zone failures by programmatically remapping your public IP addresses to any instance in your account. Rather than waiting on a data technician to reconfigure or replace your host, or waiting for DNS to propagate to all of your customers, Amazon EC2 enables you to engineer around problems with your instance or software by quickly remapping your Elastic IP address to a replacement instance.

>>Elastic IP Addresses

No cost for Elastic IP addresses while in use
$0.01 per hour when not mapped to a running instance
100 free Elastic IP remaps per month per account and $.10 per remap thereafter

Amazon S3 usage is billed separately from Amazon EC2; charges for each service will be billed at the end of the month.


I guess in brief, if there’s nothing definitive on Amazon’s sight and you have a working solution, the KISS rule might apply (Keep It Simple Silly). Stay with the third party with a permanent zone.

This is actually not entirely Amazons fault. GoDaddy is the party that makes spinning up new name servers hellaciously roundabout. :wink:

Here’s the thing: A nameserver at GoDaddy must be an existing hostname. e.g. you need a zone that is already live that you can add your new Amazon name servers to, because you have to give GoDaddy NAMES of your new nameservers–even though the glue record provides IP addresses and names, GoDaddy won’t let you give them the IP addresses…it only lets you give them the name and they lookup the IP.

So, create an ns0 and ns1 in some zone you already have running somewhere, and point them to your Amazon EC2 instances that will be your name servers.

Next, give those IPs to GoDaddy as your two name servers for your new zone.

Then, if you don’t want those name servers to be named by that old zone, you can create new ns0 and ns1 records on the EC2 systems in the new zone, and once that’s propagated you can tell GoDaddy to use those new names.

Confused yet?

Hi All !
Well, I am a little bit late, but since my problem is analogous I didn’t create a new post.
I want to evaluate the virtualmin GPL ami. Everything is ok so far, I’ve set up the instance with an elastic IP. Now I want to use it as a host account and DNS server simultaneously.
I have registered domain xxx.com to server as a name server - ns1.xxx.com, ns2.xxx.com. When I or one of my potential clients registers domain somewhere, he only enters ns1.xxx.com and ns2.xxx.com for it and I should add the domain as virtual server through virtualmin. This logic is inherited from my cpanel experience.
As mentioned above, I cannot have ns1.xxx.com and ns2.xxx.com for the DNS server of my ami, since it does support only one public IP.
I read your explanation, but can’t really put it into practice.

So, create an ns0 and ns1 in some zone you already have running somewhere, and point them to your Amazon EC2 instances that will be your name servers.
Is it possible to make an intermediate DNS server and redirect it to my ami ? For example - I purchase a server with two IPs 0.0.0.0 and 0.0.0.1 and point ns1.xxx.com to 0.0.0.0 / ns2.xxx.com to 0.0.0.1. Then with this intermediate server I redirect the request to my ami dns server, which can then deal with the dns records ? Or this is just my fantasy ?
Is it possible to make an intermediate DNS server and redirect it to my ami ? For example - I purchase a server with two IPs 0.0.0.0 and 0.0.0.1 and point ns1.xxx.com to 0.0.0.0 / ns2.xxx.com to 0.0.0.1. Then with this intermediate server I redirect the request to my ami dns server, which can then deal with the dns records ?

I have no idea what you’re talking about. :wink:

Sorry, you’ve completely lost me.

What, specifically, is the problem you’re trying to solve?

Also, note that while you can certainly delegate (that’s the word you’re looking for, when you say, “redirect”…DNS doesn’t do “redirection”…but it can delegate some zones to other servers) zones within your highest level zones to other DNS servers, but I can’t think of how that would be useful to you.

You almost certainly just want to have slaves. That’s the whole point of the redundancy requirements of DNS.

Make your “main” server your master, and make the other server your slave. Set them up as documented in the “DNS Slave Auto-Configuration Quick Start Guide” in the documentation, and forget about it. DNS is a solved problem. Don’t do anything tricky…you’ll just confuse yourself (and me).

Well, you only need a DNS server that gives your IP when queried.

When you setup Virtualmin, by default, it’s the primary DNS server for the domains on the server.

But it’s pretty straight forward to setup some slave DNS servers, which you can setup as ns0 and ns1 and use as your glue records in GoDaddy or whichever registrar you’re using.

The guide for setting up slave DNS servers is here:

http://www.virtualmin.com/documentation/id,dns_slave_auto-configuration_quickstart/

Well, sorry for confusing you, I feel really dumb - wrong terms and messy explanasions for my problems.

I have read id,dns_slave_auto-configuration_quickstart, but I haven’t answeted my personal questions yet. Let me describe the situation one more time with simple words.
I have virtualmin ami - ec2-whatever.compute-1.amazonaws.com
Suppose I have a client, who needs a website hosing. He sends me the code for the web site and asks me:

  • I have registered my sample.com domain at sampleregister. Which dns servers should I set, so that your hosting could handle it ?

That’s no brainer question if I had two IPs and could set proper ns1 and ns2. But with EC2 I have one.

Sorry gyus one more time for bothering you. I really spent hours for googling and reading posts here, but I have only general knowledge for the dns stuff and I am new to virtualmin also.

That's no brainer question if I had two IPs and could set proper ns1 and ns2. But with EC2 I have one.

So, you don’t have the resources you need to provide DNS service. :wink:

Most registrars will insist on two IP addresses. There are numerous DNS hosting services out there, and those might be the right choice for you–it means Virtualmin can’t manage DNS for you (which is a pretty big negative, if you don’t really know what you’re doing), but it doesn’t require two IP addresses.

Some registrars will probably let you get away with the ns1 and ns2 both resolving to the same IP. You could try it and see, but I wouldn’t count on it.

Thanks for the explanation. That is a bad limitation of EC2.