Take the 2-minute tour ×
Information Security Stack Exchange is a question and answer site for Information security professionals. It's 100% free, no registration required.

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?.

EDIT: I've asked same question on superuser.com (How exactly does DNS work?) and I got a better answer there. Now, I understand it properly.

share|improve this question
9  
Sounds like a query for Super User or Server Fault. You might want to see if it's already been answered on one of those sites, before requesting migration. –  Iszi Nov 3 '11 at 19:58

1 Answer 1

up vote 5 down vote accepted

When you own a domain (say name.com), you own it through a registrar. The registrar maintains a server which talks to the root DNS and tell them: the domain name.com exists, here are the IP addresses of the nameservers which know more about name.com (let's call these addresses ns1 and ns2). When a random machine on the Internet wants to talk to, say, www.name.com, it more or less directly asks to the root DNS "I want name.com" and the root DNS answers "these nameservers know".

Some registrars maintain their own nameservers and may suggest, sometimes insistently, to the domain owner that he really should use their marvelous nameservers. That is, ns1 and ns2 should be the IP addresses of two machines that the registrar controls.

Some hosting services, nominally designed to maintain a Web server and your data, may also propose to "host your domain", which means that they also have nameservers ready to be the ns1 and ns2. This does not make it mandatory but that might be the service you actually bought. So your "hostmaster" is telling you "tell your registrar that the ns1 and ns2 shall be my ns1.hostmonster.com and ns2.hostmonster.com".

The registrar wants to manage your nameservers because it ensures that it is done "right" with appropriate connectivity. The hosting service wants to manage your nameservers because it makes it easier to map the host name ("www.name.com") to the actual IP address(es) even when the hosting service goes crazy with migration and load balancing. Of course, both the registrar and the hosting service also want to host your nameservers so that you do not feel free to switch to another provider; that's called a captive market.

share|improve this answer
1  
At the end of the day you could host your own name servers and make them both have a fit ;) –  ewanm89 Nov 3 '11 at 22:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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