Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a few domains I want pointed to a VPS, and I'd like them to use the VPS as their nameserver so that each is and The nameserver is thus at the same IP as the web server. My domain is hosted at 1and1 which may or may not have any relation. I tried following and but was ultimately unsuccessful.

Here is my /etc/bind/ file:

$TTL    604800   IN      SOA (
                              16        ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                         604800 )       ; Negative Cache TTL
;   IN      NS
@       IN      A
ns1     IN      A
www     IN      CNAME

Here is my /etc/bind/named.conf.options file:

options {
        directory "/var/cache/bind";
        forwarders {
        query-source address * port 53;
        notify-source * port 53;
        transfer-source * port 53;
        auth-nxdomain no;    # conform to RFC1035
        listen-on-v6 { any; };

And here is my /etc/bind/named.conf.local file:

zone "" {
        type master;
        file "/etc/bind/";

If anyone can tell what I'm doing wrong I'd greatly appreciate it. Thanks.

share|improve this question
How is this a "private" nameserver? What does "ultimately unsuccessful" actually mean? – womble Jul 30 '11 at 4:53
up vote 3 down vote accepted

Well, you've got at least one major screwup in your zone file: An A record takes an address, not another name, so

www     IN      A

is completely wrong. Try making in a CNAME, or changing the rrdata to an IP address.

Also, running both your nameservers off the same IP is... well, PG-rated words fail me. Suffice it to say, stop that. There are thousands of free secondarying services.

It appears that isn't running an SMTP server, and given that the domain lacks any MX records, is an invalid e-mail address. Best to fix that, too.

Running a squish over for A records gives me a SERVFAIL, so something's fundamentally screwed in your nameserver config. The bits that you've given seem OK, but what is actually including /etc/bind/named.conf.local? That may not be present in your named.conf (we can't tell, you haven't provided it).

Make sure you actually restarted bind after dropping in all this config, and make sure there isn't something else that's, say, setting allow-query to something restrictive. It's also not good practice to run a recursive and authoritative nameserver in the same process.

Finally, check your logs. They'll almost certainly be able to provide you with the reason why whatever's going wrong is going wrong.

share|improve this answer
Overnight I redid the DNS entries on my registrar, 1and1, and pointed another domain to my VPS with GoDaddy. Along with your CNAME record fix, both are properly working this morning. Thank you. I plan to use a secondary DNS service as well, but don't really see much point. I'm still working on the email since I'd rather not host email myself (don't want to lose emails), but am not completely sure how to hook up the MX entries so that they don't require my VPS to be on to direct email. – odie5533 Jul 30 '11 at 13:14

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.