DNS – How Exactly Does It Work?

dnsopendns

I'm learning pentesting from books. So far I thought I know about DNS but now I'm completely lost and confused.

well, I know what happens when you enter domain name in your browser:

enter image description here

Say, I've bought a domain on name.com. So, all my DNS information will be stored with name.com right? Because I can manage my domain information by logging into name.com.

Now say, I'm hosting my website on hostmonster.

Me: Hey, I want to buy some space on your server.Here is the payment
for it

Hostmonster: Thanks, We are providing you space on server with
IP 12.34.56.78. Now go and update it for your domain name with your
registrar.

This is what I expect to happen. But no it doesn't happen.Instead, Hostmonster gives me two nameservers NS1.HOSTMONSTER.COM or NS2.HOSTMONSTER.COM. WHY?? I thought name.com was having the nameservers and it was containing my information. Now where did this hostmonster nameservers come into picture. its confusing. please clarify what exactly is happening?.

Best Answer

Hostmonster wants to be come the new authority for your DNS zone.

You DNS zone is equivalent to your domain name example.com. In that zone file is defined what IP address example.com points to (as well as all sub-domains, like www.example.com).

For every DNS zone, you must define a name server that handles that zone. So far, that name server was provided by name.com. Hostmonster has now provided you with 2 new name servers for your domain.

To illustrate this, let's request the whois for superuser.com:

$ whois superuser.com

Whois Server Version 2.0

Domain names in the .com and .net domains can now be registered
with many different competing registrars. Go to http://www.internic.net
for detailed information.

   Domain Name: SUPERUSER.COM
   Registrar: NAME.COM LLC
   Whois Server: whois.name.com
   Referral URL: http://www.name.com
   Name Server: NS1.SERVERFAULT.COM
   Name Server: NS2.SERVERFAULT.COM
   Name Server: NS3.SERVERFAULT.COM
   Status: clientTransferProhibited
   Updated Date: 03-feb-2012
   Creation Date: 01-nov-1995
   Expiration Date: 31-oct-2016

As you can see, it lists 3 name servers which are responsible for that domain. These are the name servers responsible for all names in that zone. They are the name server entries that are supposed to be replaced in the process you mention.

Related Question