Nameserver issue

8 posts / 0 new
Last post
#1 Wed, 11/17/2010 - 21:18
decay

Nameserver issue

Hi,

sorry for this, im sure this is explained a lot before but i cant seem to understand the exact process. First let me tell you what im facing and what i have done.

Assume Domain registered: bob.com (through godaddy) Server IP: 123.123.123.1, 123.123.123.2 Server Hostname: myserver.DynDNS.com (registered through DynDNS.com for free dns domains and is linked to 123.123.123.1) so i login to virtualmin through myserver.DynDNS.com:10000

OK, so first i went to godaddy and registered bob.com. Now i added ns1 and ns2 (ns1.bob.com and ns2.bob.com) to the hosts list with the correct ip addresses through godaddy (following the tutorial at http://www.virtualmin.com/node/6827). So i have done upto:

You don't do anything in Virtualmin for the first set of name servers. GoDaddy won't let you spring a nameserver into existence that doesn't already have a hostname pointing to it. You need a zone that you control, and already has name service (that you also control), in order to create two new name server records that point to your Virtualmin server. Your Virtualmin server does not need to know about these names at all (and it won't do any good for it to know about them, because GoDaddy won't let you enter an IP and bootstrap a server into existence...some registrars will trust that the names/IPs you're entering will resolve correctly, but GoDaddy is not one of them).

You can use any number of free DNS hosting services (including GoDaddy itself) to setup those first name servers on some zone that you control. You can't use your Virtualmin server as a name server until it already has a name that resolves.

So, login to GoDaddy, go to the Domain Control Center.

Click on one of your zones that has name service provided by GoDaddy servers (this is the default when you first buy a domain at GoDaddy). It doesn't matter if this is the zone you want to be the "permanent" name server hosting zone. This is just temporary until you have made your Virtualmin server exist for GoDaddy.

Find the section labeled "Hosts" at the bottom of the page, and click "Add".

Fill in "ns1" in the hostname. Fill in the first IP address of your Virtualmin server in the Host IP 1 field.

Click OK.

Click Add again in the Hosts section.

Fill in "ns2" in the hostname. Fill in the second IP address of your Virtualmin server.

Click OK.

Then i added ns1.bob.com and ns1.bob.com to the nameservers part of the bob.com domain inside the godaddy admin area.

Now the next part is a bit shady for me. I cannot follow the steps here (seems a bit confusing to me). The instructions state:

Now (or a few hours from now, when the GoDaddy server reloads its zone files), you can make use of your Virtualmin server. For your next zone, you're going to change the name servers to ns1.domain.tld (whatever zone you used in the steps above) and ns2.domain.tld. Once that zone is up and running you can actually move all name hosting (including the zone you used in the bootstrap step above) to your Virtualmin server.

(I consider this the single most irritating thing about GoDaddy.)

Once all of that's done, you may want to fiddle with the kinds of NS records Virtualmin produces, and you may want to setup a DNS slave.

The BIND sections of the Webmin documentation might be worth reading up on:

http://doxfer.webmin.com/Webmin/BINDDNSServer

http://doxfer.webmin.com/Webmin/BINDTroubleshootingTools

But you don't actually need to do anything to setup zones in Virtualmin. I'm just including this as "recommended reading" if you still aren't sure what the heck I'm talking about.

You will need to add a secondary NS record to your Virtualmin Server Templates, IF you are not running a slave DNS server.

Browse to the Server Templates that you use, and in the BIND DNS domain section, add:

${DOM} IN NS ns2.domain.tld

Where domain.tld is replaced with whatever domain you plan to use for your name server zone. (Usually your primary company domain. For example, we use ns1.virtualmin.com and ns2.virtualmin.com for all of our various zones.)

And, you may also need to explicitly set the first name server, if the hostname of your server is not the name you want to serve out as the other NS record. That can be set in the "Master DNS server hostname" field. Set it to ns1.domain.tld.

DNS can be very intimidating, until you really grasp what it's doing and how it works, but it's actually a pretty simple bunch of concepts.

Just remember:

    * The registrar (GoDaddy) tells the world how to find your name server
    * Your name server tells the world how to find your host addresses.

You need both for anything to work. Virtualmin can only handle the host addresses. It can't do anything about GoDaddy and those glue records. (Our domain registration plugin might actually handle some of that, but it doesn't support GoDaddy yet.)

So without doing this 2nd part i have no probolem loading bob.com. But i have had complains that the website sometimes dont load and gives unable to resolve address errors (all sounds like dns things). So i used some online dns lookup tools and found some of these tools says my NS is ns1/ns2.bob.com but some say myserver.DynDNS.com.

I just need to also confirm that as it is, myserver.DynDNS.com can be pingged/tracert'd and it shows the server ip. But, ns1/ns2.bob.com cannot be pinged from my local machine nor tracert'd. This is probably obvious...

I also tried http://www.checkdns.net/ In the report it stated that:

NS list mismatch: registration authority reports that domain is hosted on the following servers: 'ns1.bob.com; ns2.bob.com', but DNS server ns1.bob.com reports domain to be hosted on 'myserver.DynDNS.com'. Please make sure that you configure the same DNS servers in registrar database and on your DNS

Can anyone please tell me some clear way to fix this? Im a bit lost right now... :( Any help would be greatly appreciated :)

Thu, 11/18/2010 - 04:16
Locutus

Greetz!

Excuse me please, I haven't gone through your whole extensive post yet, but two advices I can give here. :)

First off, why exactly are you using dyndns? It is not possible to operate a nameserver for a second-level domain (that means if the registrar enters your servers as authoritative for the domain) on a dynamic IP address. For second-level domains, the NIC needs nameserver hostnames (ns1.bob.com) and static IP addresses associated with them (123.123.123.1).

Also, most registries require at least two nameservers in separate /24 networks. 123.123.123.1 and 123.123.123.2 is not recommended, if it's allowed at all in your case.

Are you trying to host the authoritative nameserver on a dynamic IP, like your "DSL at home"? Or are you using dyndns because your hoster does not give your server a resolvable hostname?

Then about the error message at the end. Well I think the error is quite clear. :) Your nameserver reports a different NS for your domain than the NIC. If your server itself has a different hostname than what you'd like to use your "nameserving" purposes, you can use the Virtualmin server template function BIND DNS Domain -> Master DNS server hostname, and switch that from "Automatic (from system's hostname)" to "Hostname", and enter your "ns1.bob.com" there. (This change will only apply to new domains, so to have it become active for the existing one, you can turn off the DNS Domain feature for the domain and turn it on again, which will create a new zone file.)

This will only work of course if you actually have a static IP address and are going to put that in with GoDaddy so they can create a glue record from it. If your nameserver is dynamic, you need to enter that dynamic hostname with GoDaddy and have them supply that to the registry. It is not recommended to do that though, since there are caching periods involved. When your IP changes, that change will usually not be reflected right away throughout the DNS.

Thu, 11/18/2010 - 07:07
decay

Hi,

Sorry maybe i made it a bit more confusing. On my post, all domains/ips etc were fake. I replaced the addresses with fake addresses (i know 123.123.123.1 sounds bit silly but thats the first thing that popped into my mind, but my proper ip looks normal lol).

The server is hosted through Volume Drive. VPS. they give you 2 static ip addresses. And there is no ressolvable host name. When i was setting up virtualmin earlier it said i needed a ressolvable host name, so i went on dyndns to get a host name.

so what exactly should i be doing right now?

I have 2 name servers registered at godaddy (with the 2 ip addresses), and my domains name servers are set to these 2 (ns1/ns2.bob.com).

i cannot ping these nameserver addresses. But the website seems to resolve and come to the correct server (this is the case for almost everybody, except one person who just recently complained about website not loading). I can even ping/tracert the domain name of the website and it goes into the correct server ip address etc. whois shows ns1/ns2.bob.com.

the dyndns web address is also linked withe the first ip address, and this is being used as the host name at the moment on the server.

What do i need to do to set things right? (i dont really like the error that was on the earlier post) O.o

Thu, 11/18/2010 - 07:24
Locutus

The server is hosted through Volume Drive. VPS. they give you 2 static ip addresses. And there is no ressolvable host name.

Oookay, that explains that, and why yo used dyndns. :) So you basically did that to get a "temporary resolvable host name"?

Actually, that should not even have been necessary... When registering a new domain, you should be able to give your registrar the hostnames (ns1.bob.com etc.) together with the valid and static IP addresses of the server hosting the zone, and that should suffice to set up a new domain. It depends on how your registrar handles things though. So it's not wrong or a problem to get a "temporary hostname".

so what exactly should i be doing right now?

See the second-to-last paragraph of my previous post, that should explain how to get rid of the error that was reported before.

For further insight, I'd need to know the non-fake IP addresses and domain names you're setting up, so I can take a look myself at what the NIC and your servers report and how they behave. If you don't wish to make the addresses public (though it's not really a problem to do so - if you're offering web services, the information to reach your system is public anyway), you can send it to me via email at "admin ##AT## tianet ##DOT## de".

Fri, 11/19/2010 - 06:02
Locutus

I sent you emails with my problem analysis. :)

Sat, 11/27/2010 - 09:47
decay

Updates on this issue.

Starting everything from scratch. Assume 123.123.123.1 and 123.1213.123.2 are my server ip addresses and have 2 domain names mainsite.com and clientsite.com purchased on godaddy. At the end of the day i want both of these domain names to be hosting websites on my server with virtualmin.

I found this: http://www.howtoforge.com/ispconfig_dns_godaddy i followed the steps on that page to setup 2 name servers. well, im not entirely sure if its a name server or what ever (i dont understand this completely just yet). But any way, as the way that page explains, i setup 2 nameservers (a records) for ns01/ns02 on mainsite.com (to the 2 ip addresses i mentioned on the earlier). (note. on the same section the a record for @ was changed to my first ip address too, i read somewhere this means it redirects the root of the domain name to the server, but im ot really sure, it just seemed logical).

now i can ping/tracert ns02/ns01.mainsite.com.

Then after reading here: http://www.virtualmin.com/node/6827 I decided to add ${DOM} IN NS ns02.mainsite.com in the bind dns domain on the server template, also added master dns server hostname as ns01.mainsite.com This felt like the natural next thing to do.

I wasent really sure about the next part, so i assumed this is what to do. So i went to another domain i have hosted on godaddy (clientsite.com). This is another domain i am hosting a website for on my virtualmin vps. I changed the nameservers of that domain to ns01/ns02.mainsite.com.

For some reason my clientsite.com is not resolving now (it was already added to virtualmin on my server earlier). but mainsite.com is actually resolving (im assuming this was because of me adding the server ip address to the @ thing). but any sub-domains of mainsite.com is not resolving.

Any idea of what im doing wrong, or what i need to do next?

Im a bit desperate now, any help would be greatly appreciated... :)

Sat, 11/27/2010 - 17:52
decay

grrrr, Any ideas about this one?

NS list mismatch: registration authority reports that domain is hosted on the following servers: 'ns01.mainsite.com; ns02.mainsite.com', but DNS server ns01.mainsite.com reports domain to be hosted on 'ns02.mainsite.com.clientsite.com; ns01.mainsite.com.clientsite.com'. Please make sure that you configure the same DNS servers in registrar database and on your DNS
Sat, 11/27/2010 - 18:36
andreychek

but DNS server ns01.mainsite.com reports domain to be hosted on 'ns02.mainsite.com.clientsite.com;

I'd expect this kind of problem to occur if the DNS records for "ns02.mainsite.com" on your server didnt' end in a ".".

That is, when you add an 'A' or 'NS' record for "ns02.mainsite.com" when in Services -> DNS Domain, the name "ns02.mainsite.com" must end in a "." in your DNS record.

So it would need look like this when setting up the DNS name:

ns02.mainsite.com.

Topic locked