I’m having trouble fully understanding how the DNS system works in general and with Virtualmin… in the past most of my sites have been hosted on shared hosting using cpanel or something similar. Iv not had to worry about setting up DNS all I had to do was add the domain on in cpanel and point my domain in godaddy to specified nameservers and it all worked fine and dandy!
Iv got a cheap VPS that’s got Ubuntu 8.10 installed and updated and has two ip addresses. I basically got this VPS to play with a learn on before moving any live websites over to it.
So far iv managed to get virtualmin installed and working with the install script.
now comes the confusing bit for me…
When setting this up it asked for a fully qualified domain name, does this mean it requires one of my actual registered domain names that I intended to use for a website? If so why?
I had planned to setup the VPS and host two completely separate sites each having its own IP address ( I know this isn’t necessary) and domain name associated with it. But now Im not sure what to do, should I use the domain name of the main site as the host name? I’m kinda lost here…
can somebody explain to me in layman’s terms how to set this up correctly, so that I will have working nameservers to point my individual domains names to that I will use for each virtual server.
Well, DNS is an involved beast. You might consider investing in a book such as O’Reilly’s “DNS and BIND”, which I really liked – it helped me learn the ins and outs here.
A fully qualified domain name (FQDN) is a name like:
Your server will need a FQDN – it needs to be using a domain name that you own. If you have a domain name you’d consider the “main” one for your site, I might choose that.
If you’re looking to setup your server as a nameserver, you’ll need to register it as a nameserver with your domain name registrar.
-Eric
Iv been reading and sort of understand what is going on. But Do I really need to use my VPS as a name server or could I use free domain services such as Afraid.org?
Also is it not possible to use the nameservers of my VPS provider? Why is it desirable to have your own private nameservers on a VPS in the first place?
Well, some domain name registrars – GoDaddy is an example – offer free DNS service.
So if you’re using a registrar similar to GoDaddy, instead of needing to act as a nameserver, you could simply enable the DNS service there, and point the various records to the IP addresses on your VPS.
-Eric
There is a module under Webmin - Networking - Network Configuration - Hostname and DNS Client
that is where you organise this for a start.
You need a domainname at a registrar where you can register the 2 IP’s for your nameservers.
This is not the same as changing nameservers for a domain.
Your registrar will announce the 2 IP’s and the domainname to the world. Not all registrars do this. (namecheap.com does and you can do it from your account there)
So now the world knows where to find your domain and any other domain on your box using your nameservers. Then in the module you write for instance server.domainname.com or ns.domainname.com or dns.domainname.com. You get the picture.
At DNS servers in that part you would have the local IP 127.0.0.1 and the 2 IP’s (nameservers) of your ISP (so not your own) because the ISP needs to find your machine when a request comes in.
Then under Host Addresses you’ll bind the IP’s to the names.
So, there’s two ways to setup DNS for your server:
Let someone else do it
Do it yourself
Both have benefits and drawbacks
Ronald’s excellent writeup described #2, how to do it yourself.
If you want to let someone else do it – such as GoDaddy – then yes, you’d set that up using GoDaddy’s Total DNS Control.
How does that affect your Virtual Servers?
It means that anytime you add a new domain or sub-domain to your system, you have to go back to GoDaddy, and add the domain and IP address into Total DNS Control.
If you don’t intend on adding new domains very often, that’s not a big a deal.
If that happens a lot, you may end up finding that to be inconvenient.
-Eric
Ok and will they make a difference to me when setting up email accounts on domains/ virtual servers as I see in the total DNS control I have the option to edit all the mail settings and everything.
What are the main things I should change when using Total DNS control to point to my servers?
In the host section of total DNS control I have two sections to fill in
In the first section I put in the hostname of my server and pointed it to one of my ip addresses and set ttl to 30mins
what do I put in the second host section that currently only has @ in it?
Also I take it with total dns control I can point the www.mydomain.com to my server but still use godaddy’s free email service with the domain by not changing the email setting in total dns control?
First, I’d get rid of all the domains/sub-domains GoDaddy setup by default, and start over
If your domain is “example.com”, you basically want to setup a number of records to point at your server – that includes example.com, www.example.com, admin.example.com, webmail.example.com, and mail.example.com – along with anything else you want to resolve to your address – and you need to make sure they’re all going to your server by setting them up as address and/or cname alias records.
Regarding GoDaddy’s free email service – you have to choose whether you want email going to your server, or to GoDaddy – you can’t have both unfortunately
I wouldn’t worry about the TTL’s, you can leave those at the defaults.
-Eric
Well, I’m not an expert on how to setup DNS/email on GoDaddy, but in general, it means:
You need to have an MX record setup in your DNS (ie, Total DNS Control) that points to GoDaddy. I believe this is the default, so you may not have to do much there
You’ll want to disable the “mail” and “dns” features in Virtualmin so that your server understands it doesn’t need to do those things (in System Settings -> Features and Plugins).
ahh but will doing this still allow some of the virtual servers to still have email running from them. Its just mail account from my main domain I want to keep at godaddy.
arrrghh Im just totally lost now mate, the more I read the more confused I become… I need some kind of step by guide on either how to setup my own private nameservers on my vps with webmin/virtualmin or a Step by step guide on how to use the godaddy dns service either way I just want this shit to work…most of the webmin how to’s iv found have been out of date and the icons settings pages it tell you to click dont even exist in my version.
I agree that a DNS step-by-step guide would be helpful.
But we don’t have one yet
DNS is a complex beast, and it’ll take some time to create that.
Ronald offered a pretty detailed explanation above on how you might go about setting up your own server as a nameserver.
If it’s just not clicking for you, you might consider tossing a few dollars someone’s way to have them guide you through each step of the process, since there’s a lot of moving parts involved here.
For example, you may be able to talk Ronald into that
However, we will have a DNS step-by-step guide online at some point.
As far as changing your hostname – you can do that in Webmin -> Networking -> Network Configuration -> Hostname and DNS client.
-Eric