Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Just bought my first VPS and have a hard time configuring stuff. Uses OpenVS and Ubuntu 11.10

I have a domain setup in bind9 as master. Here is the contents of bind9 files I have configured on my server, with domain names and IP changed. I want serverdomain.com to remain master (main domain of the server). The IP (I only have one) is

My named.conf.local file contains

zone "serverdomain.com" {
    type master;
    file "/etc/bind/zones/serverdomain.com.db";

zone "3.2.1.in-addr.arpa" {
    type master;
    file "/etc/bind/zones/rev.3.2.1.in-addr.arpa";

The rev.3.2.1.in-addr.arpa contains

$TTL 604800
@ IN SOA serverdomain.com. indo.serverdomain.com. (
    86400 );

IN      NS      ns1.serverdomain.com.
4       IN      PTR     serverdomain.com.

The file serverdomain.com contains

; BIND data file for serverdomain.com
$TTL 14400
@ IN SOA ns1.serverdomain.com. mail.serverdomain.com. (
    201301152       ; Serial YYYYmmdd#
    7200            ; Refresh
    120             ; Retry
    2419200         ; Expire
    604800)         ; Default TTL
serverdomain.com.   IN      NS      ns1.serverdomain.com.
serverdomain.com.   IN      NS      ns2.serverdomain.com.
serverdomain.com.   IN      MX      10      mail.serverdomain.com.
serverdomain.com.   IN      A
ns1             IN      A
ns2             IN      A
www             IN      CNAME   serverdomain.com.
mail            IN      A
ftp             IN      CNAME   serverdomain.com.
serverdomain.com.   IN      TXT     "v=spf1 ip4: a mx ~all"
mail            IN      TXT     "v=spf1 a -all"

When I go to serverdomain.com, I see the php page as I should. All OK for now.

Now, I want to create the nameservers (keep in mind I only have 1 IP, but all registrars require at least 2 nameservers)


which I will then use as nameservers for my other domains, like mynewdomain.com I will then create the virtualhosts in apache for mynewdomain.com I already created the virtualhosts for mynewdomain.com but pinging the domain from system (other than server) says it can't find the host. If I ping the domain from the server it works because I added the domain to the hosts file.

I used DNS record A with my registrar for serverdomain.com (@ and www). I use namecheap.com Created nameserver with registrar using Nameserver registration (pointed ns1 & ns2 to IP) Also, ping ns1.serverdomain.com doesn't work either.

What am I missing?

Thank you

share|improve this question
I don't think Namecheap will work if you set two nameservers to the same IP. What is the domain in question? –  gparent Jan 15 '13 at 19:38
These sorts of problems are much easier to diagnose if you add your actual domain. You can diagnose your own issues by using IntoDNS –  Ladadadada Jan 15 '13 at 19:49
OK, so be it :) My domain is serverul.com. I checked intodns.com/serverul.com and doesn't seem to be anything about my ns1.serverul.com and ns2.serverul.com –  heXer Jan 16 '13 at 7:55

2 Answers 2

I may be wrong (as in I'm not reading your post correctly), but it seems like you left out the glue record steps. You have to create these records at your registrar as a separate step from inputting your nameserver records.

share|improve this answer
As far as I can tell, I added the glue records in my registrar (namecheap.com). However, since I only have 1 IP, I used the same for both ns1. and ns2. nameservers. What I am also unsure, is if I created the correct bind config for the nameservers. The tutorial is here: namecheap.com/support/knowledgebase/article.aspx/16/2 –  heXer Jan 16 '13 at 8:03

A few thoughts:

You write:

I want serverdomain.com to remain master (main domain of the server). 

That's not what it means to declare a zone as a master. In BIND, zones for which you are authoritative (leaving out the built-in ones) can be either master (which take their information directly from a zone master file in local storage) or slave (which receive copies of their zones from a master nameserver for the zone.)

but pinging the domain from system (other than server) says it can't find the host.

You're not really "pinging the domain" here -- again, loose use of terminology is making your question harder to answer -- but it seems clear you're not getting the result you expect.

I agree with others here that there is likely a broken delegation between the DNS root and your domain, most likely where your NS records are supposed to be inserted at your registrar.

You can use the "dig" utility to help you test this. If you give dig the "+trace" flag it will start at the root and work its way down to your domain, showing you the results along the way. This can be very helpful for troubleshooting broken delegations.

share|improve this answer
OK, so I made it work, but I doubt it's correct/optimal. My domain is serverul.com (real domain). I set the nameservers in my registrar to ns1.serverul.com and ns2.serverul.com for this domain, and also in the registrar these nameservers point to my IP. In the secondary domain I also set these nameservers, and on my VPS I created a zone file for this domain, and it now works. However, I don't have a reverse zone file for any domain, and as far as I can tell if I want mail, I have to set the MX in my registrar. Correct? –  heXer Jan 21 '13 at 7:57

Your Answer


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.