I have installed bind9 on a Debian VPS, and use it as nameserver for one of my domains. It works well. dig reports correct entries.

I now wish to use this nameserver for four more domains, and am a bit confused about certain configuration parameters.

The primary domain I used is drjoel.in, for which I have set up the following in master zone file

cat /etc/bind/named.conf.local
zone "drjoel.in" {
     type master;
     file "/var/lib/bind/db.drjoel.in";
     allow-update { key rndc-key; };
zone "31.167.199.in-addr.arpa" {
     type master;
     file "/etc/bind/zones/rev.";

I have added this:

zone "relsoft.in" {
     type master;
     file "/var/lib/bind/db.relsoft.in";
     allow-update { key rndc-key; };

for my second domain, and the following in /var/lib/bind/db.relsoft.in:

relsoft.in.       IN      SOA     ns1.joel.co.in. admin.relsoft.in. (
                   2007010401           ; Serial
                         3600           ; Refresh [1h]
                          600           ; Retry   [10m]
                        86400           ; Expire  [1d]
                          600 )         ; Negative Cache TTL [1h]
relsoft.in.     IN      NS      ns1.joel.co.in.
relsoft.in.      IN      NS      ns2.joel.co.in.
relsoft.in.      IN      MX      10 aspmx.l.google.com. 
relsoft.in.     IN      A
www.            IN      A
ns1.            IN      A
ns2.            IN      A
mail.relsoft.in.        3600    IN      CNAME   ghs.google.com
*.relsoft.in.   3600    IN      CNAME   relsoft.in.

My /etc/resolv.conf currently looks like this:

#cat /etc/resolv.conf
search drjoel.in

My questions are:

  1. What should my resolv.conf be, to allow me to use this server as nameserver for both domains?
  2. Am I correct in assuming that I shouldnt add a reverse DNS (PTR) for the second domain, since I already have one for the first domain?
  3. Other than editing /etc/bind/named.conf.local and adding /var/lib/bind/db.relsoft.in, are there any additional steps to do?
  1. resolv.conf has nothing to do with using the nameserver for a domain. (resolv.conf contains a list of caching nameservers for the server/host, and not a list of authoritative nameservers for the domains hosted on the server .
  2. For the domains to work, you don't need reverse DNS. Also probably you can't set that (ie rDNS's won't be visible on internet). This is because in most of the cases is set by your server/IP provider . 3.This doesn't look ok: relsoft.in. IN NS ns1.joel.co.in. relsoft.in. IN NS ns2.joel.co.in. The nameservers shouldn't be ns1.drjoel.in and ns2.drjoel.in ? As i see joel.co.in is not registered. Well, just checked, and the nameservers are ns1.relsoft.in and ns2.relsoft.in . So i would change the NS records to that. relsoft.in. IN NS ns1.relsoft.in. relsoft.in. IN NS ns2.relsoft.in. Also change the SOA record to relsoft.in. IN SOA ns1.relsoft.in. admin.relsoft.in. ( etc
  • You're right Sandor. I'd posted the uncorrected file here. It was fixed. Your points are valid too. Thank you. Once a ran a named-checkzone, the errors were obvious. – Joel G Mathew May 5 '13 at 17:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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