0

I setup bind on my debian box, and have setup my zone files to have my nameserver defined.

When I dig, using for example:

dig @123.456.789.123 ns1.mynameserver.com

where 123.456.789.123 is the defined IP of my nameserver, it resolves 100% fine with no errors. When I go to my sites which are using this nameserver on the internet, the site is not available - but I presume this is because DNS has not propogated yet.

However, my question is, I did this all on my server only. Is there somewhere I should register my nameserver publically? I.e. why couldn't someone else just setup a nameserver called ns1.mynameserver.com based on their IP address?

How then would a client know which nameserver is the real authority?

  • There is no need to register your NS for such a setup. Did you add namezones for domains you are checking? – Glueon Oct 10 '14 at 10:28
  • Thanks, yes I added namezones, updated named.conf and the reverse zone files. But if I don't register, what would stop someone else creating a nameserver with the same domain, but pointing to a different IP? – pokero Oct 10 '14 at 10:30
  • Because it's impossible to register the same domain name twice. – Glueon Oct 10 '14 at 10:32
  • You don't really register nameservers. You register domainnames and when you register a domain name you also register which nameservers are authoritative for that domain. . Configuring the nameserver is not the same as having the domain registered. – HBruijn Oct 10 '14 at 10:33
  • OK, I register my domain name and say ns1.mynameserver.com is its nameserver (note I do NOT mention the IP of ns1.mynameserver.com). I setup up ns1.mynameserver.com on my bind server, BUT so does somebody else! There is nothing to stop someone else creating ns1.mynameserver.com, so how does DNS know which is the real one? – pokero Oct 10 '14 at 10:41
1

There is no need to register your NS for such a setup. Maybe you forgot to add namezones for domains you are checking.

  • Marking this as the answer, thanks to the comments in the above section. The option to add IPs on the nameserver definition were well hidden on my domain registrar, now it all makes sense. – pokero Oct 10 '14 at 16:06
2

Basically, the DNS "architecture" over the web is a tree. The root node is called "." (dot) and holds all the information about the Top-Level Domains (.com, .de, .ninja (generic TLD), and so on). These nameservers are officially registered and managed by various companies / countries, thus there can be only one "real" zone for each of these TLDs.

Registrars are other companies that handle the rent of subdomains (google.com, yahoo.de, ...) to customers (individuals and companies alike). That is where you have to go if you want to make sure that your domain is reachable by everyone on the web without any specific action on your side. Since your domain name is officially registered, anyone trying to create a duplicate of your domain would end up with no one being able to query it (well, no DNS server are linked to it or even know about it so basically its like it is non-existent). This architecture would create a new "leaf" to that tree.

"." -> .com -> google.com
    |       -> yahoo.com
    |
    |-> .de -> google.de
            -> yourdomain.de

If your domain name is meant to be used only by you and other people who know its address without the need to query for it other DNS servers, you do not have to officially register it anywhere. In that case, anyone could try to duplicate it but as long as nobody does lookup on it you are fine.

Finally, to answer your question:

  • if you want it to be publicly reachable you have to pay for your domain and see a registar (GoDaddy, 1&1, ...)
  • if its for another more private purpose, you do not need that. In that case you just have to manually edit your clients / servers to resolve your specific domain on your own DNS server (resolv.conf on Debian Linux for example).

Be aware though that if the domain name you want is already taken, you will not be able to register it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.