what to select in domain registrar for DNS.

10 posts / 0 new
Last post
#1 Thu, 02/19/2009 - 16:17
bert

what to select in domain registrar for DNS.

[color=#008000]Folks,

I have had websites hosted on different hosts and now I am trying out Virtualmin.I have a very basic question about DNS.

Below are three screenshot. Screenshot1 shows the options on my registrar, which happens to be NameCheap. Screenshot1: http://i40.tinypic.com/jqgf80.png

So, I used to click on the option called "Domain Name Server Setup", which would take me to this Screenshot2 and set up the Name Servers that my webhost gave me. Screenshot2: http://i44.tinypic.com/vrd374.png

Well, now I want to be my own host for 3-4 websites I have and some for friends. These are all non-critical, non-e-commerce websites. Where do I set up DNS now on the NameCheap control panel? On "Domain Name Server Setup" screen (screenshot2), or under the "Advanced" option called "Nameserver Registration" (Screenshot 3) or both? Screenshot3: http://i40.tinypic.com/65605v.png

I do have a full working Virtualmin installed with the .sh script. BIND is installed. So, let's assume my main domain for people to "sign up" for hosting is www.webhost.com. I do want a website for this domain, on the computer Virtualmin is installed. If I have my own DNS server running at www.webhost.com, then for one of my sites, like www.mysite1.com, I would go to "Domain Name Server Setup" and would enter ns1.webhost.com under. But the question is what options do I set up for my main www.webhost.com domain?

Thank you ver much, Bert[/color] [img size=197]http://www.virtualmin.com/components/com_fireboard/uploaded/images/optio... edited by: bert, at: 2009/02/19 16:20

Thu, 02/19/2009 - 16:57
andreychek

If your goal is for your Virtualmin box to become a DNS server, then you need to register it as a nameserver -- probably the "Nameserver Registration" option you showed in your screenshot.

You'd setup ns1.webhost.com and ns2.webhost.com to both point to your server (and you'll likely need two unique IP's on your server to point it to).

Then, for any domain on your server (including webhost.com), you'd use ns1.webhost.com and ns2.webhost.com as the nameservers, similar to how you had in the past.

Also, you'll probably have to setup DNS "A" records for ns1 and ns2 on your server -- you can do that in Services -> DNS Domain.
-Eric

Thu, 02/19/2009 - 19:11 (Reply to #2)
bert

[color=#008000]<b>andreychek wrote:</b>
<div class='quote'>If your goal is for your Virtualmin box to become a DNS server, then you need to register it as a nameserver -- probably the &quot;Nameserver Registration&quot; option you showed in your screenshot.

You'd setup ns1.webhost.com and ns2.webhost.com to both point to your server (and you'll likely need two unique IP's on your server to point it to).

Then, for any domain on your server (including webhost.com), you'd use ns1.webhost.com and ns2.webhost.com as the nameservers, similar to how you had in the past.

Also, you'll probably have to setup DNS &quot;A&quot; records for ns1 and ns2 on your server -- you can do that in Services -&gt; DNS Domain.
-Eric</div>

Eric,

First, thank you for your help. I understand what I need to do in my registrar's control panel. I have some follow up questions, but before that, let me tell you about my setup (the Virtualmin install was the complete default install):

- this whole set up is on a CentOS 5.2 VMware virtual machine with 3GB of RAM allocated to it.
- the host name as is seen in &quot;System Information&quot; under &quot;System hostname&quot; is set to ns1.webhost.com
- the NIC has a local IP of 192.168.2.10 which was set before Virtualmin was installed. Let's say the public ip is 12.34.56.79
- my internal network is behind a Sonicwall firewall which is also the gateway. The SW's internal IP is 192.168.2.1 and the external is 12.34.56.78
- the SW has one-to-one-NAT set for ns1: 12.34.56.79 ===&gt; 192.168.2.10

1. can you please explain how to add an &quot;A&quot; record?

2. for ns2, I do have a 2nd public IP that I could NAT to 192.168.2.11, for example. For ns2 do I have to create another minimal linux VM with, say, only BIND installed? If yes, does the hostname have to be ns2.webhost.com?

3. Should I create a Virtual Server in Virtualmin for the www.webhost.com website?

Thank you so much. I know it's a lot to read, but I thought that if I provide details, you can provide better solutions.

--
Bert[/color]

Fri, 02/20/2009 - 07:01 (Reply to #3)
andreychek

The answer to #1 and #3 are related -- you'd first want to start by adding webhost.com as a Virtual Server.

Once you do, go into Services -&gt; DNS Domain, click &quot;Address&quot;, and add a new &quot;Address&quot; (or &quot;A&quot;) record there, associating your external IP with the name ns1.webhost.com.

And then do the same thing for your second external IP and ns2.

You don't need a second VM, you can just add a second IP to your current VM. That is, both IP's would be pointing to the same server.

Yes, you lose redundancy by doing it that way, but it should do the trick for most smaller setups.
-Eric

Sat, 02/21/2009 - 00:36 (Reply to #4)
ronald
ronald's picture

you may set your wan + lan in the module config.
that's under system settings.

Default virtual server IP address
Default IP address for DNS records

you need to put the site+ip in your hosts file (the PC you are browsing to your server with) if you connect to your box over lan, else you can not see the sites.

Sat, 02/21/2009 - 06:41 (Reply to #5)
bert

[color=#008000]ronald,

Thanks for the reply. The settings there are the default settings, just as seen on http://virtualmin-demo.virtualmin.com/:

Network interface for virtual addresses: eth0
Default virtual server IP address: From network interface
Default IP address for DNS records: Same as virtual server IP

You said:
&quot;you may set your wan + lan in the module config.
that's under system settings.

Default virtual server IP address
Default IP address for DNS records&quot;

From your 4 lines above am I to understand I need to set:
my public IP 12.34.56.79 as the &quot;Default virtual server IP address&quot;
and
my local IP address 192.168.2.10 as &quot;Default IP address for DNS records?&quot;

Thank you all for your help,
Bert[/color]

Sat, 02/21/2009 - 08:57 (Reply to #6)
ronald
ronald's picture

apache serves from lan ip in your case
dns from wan ip

&quot;my public IP 12.34.56.79 as the &quot;Default virtual server IP address&quot;
no this should be internal ip like 192.168.2.10

&quot;my local IP address 192.168.2.10 as &quot;Default IP address for DNS records?&quot;
this should be 12.34.56.79

you're from NL or BE ?

Sat, 02/21/2009 - 10:48 (Reply to #7)
bert

Ronald,

Thank you. I will try it and post results.

No, I'm not from NL or BE. I'm from the U.S.

--
Bert

Sun, 02/22/2009 - 09:34 (Reply to #8)
bert

Eric and Ronald,

All is ok now. Thank you both very much.

Regards,
Bert

Fri, 02/20/2009 - 10:48
bert

Eric,

Thank you for your patience and help.

1. Created virtual server for webhost.com. With webhost.com selected as the domain, I expanded services and clicked on &quot;DNS Domain.&quot; Then clicked on &quot;Address.&quot; There were already 8 entries there for www., mail., m., etc. All had an address of 192.168.2.10, which is the local IP for ns1.webhost.com, except for localhost.webhost.com, which had 127.0.0.1). So I created to entries: ns1.webhost.com and ns2.webhost.com and entered their respective external IP addresses.

2. It dawned on me today that something very basic isn't configured right. I created another domain, mysite1.com. When I do a nslookup for that domain from &quot;outside&quot; (a website like http://www.subnetonline.com/pages/network-tools/online-nslookup.php) their DNS server obviously successfully connects to my Virtualmin DNS server, but the problem is it resolves mysite1.com to the internal 192.168.2.10, and therefore the website is inaccessible to the public. Same with all the x.webhost.com hosts, except for the newly added ns1.webhost.com and ns2.webhost.com which I assigned external IPs.

So what to do next? Surely I don't have to go into each of the 8 aliases (m, mail, www, webmail, etc.) on every domain I create and assign the public IP address of my DNS server. Right? I know that hosts configuration (which Virtualmin configures automatically when a virtual server is created) should take care of that.

Phew!

Thanks again,
Bert

Topic locked