I have for a long time had my own "play-around" domain kaareskovgaard.net where I've had a minor blog running. I recently decided that I wanted to try to run my own server on it, and so I ordered a VPS for it. I have managed to relocate my site to the new server now, setting appropriate DNS records with my old providers DNS. However I would like to move the DNS to my server. I HAVE installed a DNS server on the VPS and tested that it works as it should (using nslookup and specifying which server to use).
Here is what I don't get though:
When I ask to change nameservers for my domain, and I change it to, say "srv01.kaareskovgaard.net" for my DNS - how is this going to be translated into an IP - when the record for this is on the exact same DNS server?
I suspect there's some reverse DNS going on here, but how does this work, and is there anything I need to do to make this work, and most importantly, is this possible at all?
Thanks
This is about a glue record and isn't anything to do with reverse DNS.
If you want srv01.kaareskovgaard.net as a nameserver you'll need to give the IP as well as the hostname to your registrar. As this isn't done all that often, It's unlikely you'll be able to use there nice automated forms, and will have to contact support directly.
If they do allow you to do this on a form and don't reject it if you don't give the glue record, you'll be wanting to move registrar.
When you specify the new DNS servers, you'll have to specify both a name AND the corresponding IP, if the name of the server is a record of the domain it is going to serve.
If the name is on another domain, providing the IP is not mandatory.
In your case, your registrar won't accept just srv01.kaareskovgaard.net as a server. You'll have to provide 38.99.250.183 as well.
If the server was dns.example.com, it would validate without the IP.
You want to read about glue records in DNS.
FWH has it right: You'll specify both the names and IPs of your own DNS servers.
Your domain provider should have a glue record for your name server.
Also, if you're going to host your own DNS you should look at who's going to provide secondary DNS in case yours goes down. Some hosting providers offer this service.
To do this, you firstly need to have NameServer records setup on your own DNS server for srv01.kaareskovgaard.net. You would also usually have 2 name server records, your registrar may require this, so you may want to setup srv02.kaareskovgaard.net as well, this should preferably point to a different IP to the first one. It can point to the same DNS server, although best practice is to have a second backup DNS server for your sendon nameserver, but obviously if this is a hobby then its not neccasery.
Next when you go to your registrar and change your nameservers, you will enter srv01.kaareskovgaard.net, because the nameserver is on the same domain, you will then be asked to enter the IP of the nameserver.