This is surely a total noob question…
I’m switching to a new VPS host, and they don’t offer a DNS service. At the old host, they don’t seem to get that (wrote them 4 times about it), all they tell me is, I must set the new nameserver.
So my idea it to just make the VPS a name server that points to itself, how can I achieve that with Ubuntu? (If possible with options for sub-domains)
If you only have one VPS, then, hosting DNS isn’t such an issue as if it goes offline, your website won’t be accessible anyway.
That being said, I highly recommend that you use a provider such as afraid.org which is free.
As to how to do it, it is actually quite simple, all you need to do is go to where ever you registered your domain, go to the nameserver section (it is different in different providers), then it changes a bit…
You have to usually give the FQDN of a provider, so usually it is something like
ns1.<provider>.tld, if you want to host yourself, it changes again depending on the provider.Sometimes you have to create a subdomain yourself, sometimes it allows you to put an IP straight in to the nameserver box.
Anyway, once you have that sorted, all you need to do is install a DNS server on your box and make sure that queries can resolve to it (unfiltered on firewall), then create the zones and you are good to go! (well, good to go after the TTL’s have expired¬)