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.

I'm using BIND9 in Ubuntu to setup a local DNS that is shared by a LAN.

Here is what I want to achieve:

  1. The BIND9 server and Apache server sits on 192.168.1.65 and currently the web server is accessible via this IP address (192.168.1.65).
  2. Now I want to use customized domain names so that everyone in the network can easily remember the url: http://xyz.local/ (instead of http://192.168.1.65/)
  3. And these sub domains also need to be setup, ape.xyz.local, *.ape.xyz.local (where * is any number)
  4. If a user entered http://google.com, the dns server still can forward the request to ISP DNS, otherwise, if http://xyz.local/ is accessed, the 192.168.1.65 web server should be accessed.

Can anyone help with how can I setup that?

Here is what I have tried so far, but with no luck getting it work:

BIND zone file: db.xyz.local

;
; BIND data file for local loopback interface
;
$TTL    604800
@       IN      SOA     ns.xyz.local. root.xyz.local. (
                     2011041608         ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                         604800 )       ; Negative Cache TTL
;
@       IN      NS      ns.xyz.local.
ns      IN      A       192.168.1.65
ape     IN      A       192.168.1.65

reverse zone file: db.192

; ; BIND reverse data file for local loopback interface ;

$TTL    604800
@       IN      SOA     ns.xyz.local. root.xyz.local. (
                     2011041609         ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                         604800 )       ; Negative Cache TTL
;
@       IN      NS      ns.
65      IN      PTR     ns.xyz.local.

And this is named.conf.local

# Our domain zone
zone "xyz.com" {
   type master;
   file "/etc/bind/db.xyz.local";
};

# For reverse DNS
zone "1.168.192.in-addr.arpa" {
   type master;
   notify no;
   file "/etc/bind/db.192";
};

But now, it seems that I cannot access ape.xyz.local.

share|improve this question
    
You don't want to user the ".local" fqdn. It is used by several mDNS implementations. –  Benoit Apr 13 '11 at 8:09

1 Answer 1

check yours zone settings with named-checkzone example.com /path/example.com.db have you update serial number?

share|improve this answer

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.