DNS setup - Newbissimo question

10 posts / 0 new
Last post
#1 Wed, 05/28/2008 - 00:01
mountaintop

DNS setup - Newbissimo question

I have Virtualmin running on a dedicated server with Ubuntu 8.04 Hardy Heron. What I want to do is have www.mydomain1.com:10000 point at the Virtualmin server itself and www.mydomain2.com and www.mydomain3.com etc at the virtual servers, using the Bind server on Virtualmin. How do I configure the A and NS records at my domain registrar? Any changes I need to make in Virtualmin other than creating the virtual domains? All help appreciated!

Sun, 06/07/2009 - 07:23
ronald
ronald's picture

what I do is for every new domain I create on the system is to change the NS records at the registrar to point to my nameservers and let BIND on my system manage the records.

In the virtualmin-system settings-server template- (click a template) - under BIND DNS domain- I have added " ${DOM}. 38400 IN NS ns2.mydomain.nl. " so that it is included in the zonefiles for every new domain.

You can manually place your mydomain1.com at the top of the <virtualhost> list in the apache config so your servers IP will always point to that domain.

at least this is how I did it

Sun, 06/07/2009 - 07:23
ronald
ronald's picture

what I do is for every new domain I create on the system is to change the NS records at the registrar to point to my nameservers and let BIND on my system manage the records.

In the virtualmin-system settings-server template- (click a template) - under BIND DNS domain- I have added " ${DOM}. 38400 IN NS ns2.mydomain.nl. " so that it is included in the zonefiles for every new domain.

You can manually place your mydomain1.com at the top of the <virtualhost> list in the apache config so your servers IP will always point to that domain.

at least this is how I did it

Thu, 05/29/2008 - 02:35
mountaintop

Thanks for that - So what entries to you make at the registrar for mydomain1.com? change the NS records as well, and to what?

Sun, 06/07/2009 - 07:23
ronald
ronald's picture

what I do is for every new domain I create on the system is to change the NS records at the registrar to point to my nameservers and let BIND on my system manage the records.

In the virtualmin-system settings-server template- (click a template) - under BIND DNS domain- I have added " ${DOM}. 38400 IN NS ns2.mydomain.nl. " so that it is included in the zonefiles for every new domain.

You can manually place your mydomain1.com at the top of the <virtualhost> list in the apache config so your servers IP will always point to that domain.

at least this is how I did it

Thu, 05/29/2008 - 03:53
ronald
ronald's picture

i knew that question was next :P

So this is how I understood the documentation I have read and what action I took to accomplish what I wanted. There might be other ways but that is beyond my experience..

What I understood is to have 2 physical nameservers/machines and register their IP's (both in different networks) at the registrar where you have the FQDN. At that time I didn't have that and my registrar didn't offer such service.

So first (in Networking - network configuration of webmin) I created two virtual cards called eth0:1 and eth0:2 with corresponding IP's (I have several IP's: xx.xxx.130.15, xx.xxx.130.149, xx.xxx.130.150)

The eth0:0 is at xx.xxx.130.15 (this IP is shared by all virtual namebased servers)
It's eth0:1 is at xx.xxx.130.149 (my ns1)
It's eth0:2 is at xx.xxx.130.150 (my ns2)

So I changed all records for mydomain1.com at the registrar
Since my FQDN is a ccTLD, specifically Dutch, it requires a bit more attention than a ggTLD, like .com which in general don't complain too much about the setup.

I left the NS records untouched

NS mydomain1.com -> nameserver1.oftheregistrar.here
NS mydomain1.com -> nameserver2.oftheregistrar.here
A *.mydomain1.com -> xx.xxx.130.15 (servers main IP)
A mydomain1.com -> xx.xxx.130.15
A localhost.mydomain1.com -> 127.0.0.1
A ns1.mydomain1.com -> xx.xxx.130.149 (eth0:1)
A ns2.mydomain1.com -> xx.xxx.130.150 (eth0:2)
A sv01.mydomain1.com -> xx.xxx.130.15 (my servers hostname)
MX-5 mydomain1.com -> sv01.mydomain1.com
CNAME pop3.mydomain1.com -> sv01.mydomain1.com
CNAME mail.mydomain1.com -> sv01.mydomain1.com
CNAME smtp.mydomain1.com -> sv01.mydomain1.com
CNAME pop.mydomain1.com -> sv01.mydomain1.com
PTR sv01.mydomain1.com -> xx.xxx.130.15

I think but I am not sure that if your FQDN is a ggTLD then you can just change the ns records at the registrar and let the BIND on your server do the rest. If you just start out then per haps you can try that first to see if it works, else go the more "complicated" way I did.

There are some other adjustments I made on my system to comply with the specific Dutch requirements and may not be needed for the ggTLD's

Sun, 06/07/2009 - 07:23
ronald
ronald's picture

what I do is for every new domain I create on the system is to change the NS records at the registrar to point to my nameservers and let BIND on my system manage the records.

In the virtualmin-system settings-server template- (click a template) - under BIND DNS domain- I have added " ${DOM}. 38400 IN NS ns2.mydomain.nl. " so that it is included in the zonefiles for every new domain.

You can manually place your mydomain1.com at the top of the <virtualhost> list in the apache config so your servers IP will always point to that domain.

at least this is how I did it

Thu, 05/29/2008 - 04:04
mountaintop

Te gek!!! Will try that out tonight when I'm back at my machine.

Been having a separate issue with resolve.conf getting overwritten all the time but I think I've got the answer to that too.

many thanks for your help Ronald, will let you know the outcome!

Sun, 06/07/2009 - 07:23
ronald
ronald's picture

what I do is for every new domain I create on the system is to change the NS records at the registrar to point to my nameservers and let BIND on my system manage the records.

In the virtualmin-system settings-server template- (click a template) - under BIND DNS domain- I have added " ${DOM}. 38400 IN NS ns2.mydomain.nl. " so that it is included in the zonefiles for every new domain.

You can manually place your mydomain1.com at the top of the <virtualhost> list in the apache config so your servers IP will always point to that domain.

at least this is how I did it

Thu, 05/29/2008 - 07:32
mountaintop

right, so for mydomain2.com you would then just change the nameserver records to:

ns1.mydomain2.com
xx.xxx.130.149

and
ns2.mydomain2.com
xx.xxx.130.150

instead of the registrar's nameservers (in your example) - ie you'd use the IP numbers associated with eth0:1 and eth0:2, that right?

Topic locked