Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I successfully run BIND9 for using domain name over the local network (BIND9 installed in 192.168.0.74) but when I added WAN for adding the Internet to all the network, all the PCs became unable to see that domain name.

How can I fix this issue?

Here's my router configurations:

LAN IP:
IP address : 192.168.0.1
Subnet Mask : 255.255.255.0
DHCP Server : ENABLED

DHCP Server:
Start IP : 192.168.0.100
End IP : 192.168.0.254
DNS1 address : 192.168.0.74
DNS2 address : 8.8.8.8

WAN:
Fixed IP Address :  192.168.0.2
Subnet Mask :  255.255.255.0
DNS address :  192.168.0.74
Default Gateway :  192.168.0.190

Here's my BIND9 configurations:

/etc/bind/named.conf.local

zone "my.lan" {
    type master;
    file "/etc/bind/zones/my.lan.zone";
};

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

/etc/bind/zones/my.lan.zone

$TTL 8640
my.lan. IN      SOA     ns1.my.lan. admin.my.lan. (
          2012121600 
          28800       
          3600        
          604800    
          38400 )    
my.lan. IN      NS      ns1.my.lan.
my.lan. IN      MX     10 mta.my.lan.

www           IN      A       192.168.0.74
mta              IN      A       192.168.0.74
ns1               IN       A        192.168.0.74
@       IN      A     192.168.0.74

/etc/bind/zones/rev.0.168.192.in-addr.arpa

$TTL 8640
@ IN SOA ns1.my.lan. admin.my.lan. (
                        2012121600; serial
                        28800; refresh, seconds
                        604800; retry, seconds
                        604800; expire, seconds
                        86400 ); minimum, seconds

                     IN  NS ns1.my.lan.

2                  IN      PTR    my.lan

PS: When I use "nslookup my.lan" in 192.168.0.74 PC it works but it's not working in the other PC

ERROR message of nslookup

mbnoimi@mbnoimi-pc ~ $ nslookup my.lan
Server:     127.0.0.1
Address:    127.0.0.1#53

** server can't find my.lan: NXDOMAIN
share|improve this question
add comment

2 Answers

is mbnoimi-pc running bind9? if its not try nslookup my.lan 192.168.0.74 if that works you will need to update /etc/resolv.conf to use your bind9 server

share|improve this answer
    
is mbnoimi-pc the same box as 192.168.0.74? –  max Dec 24 '12 at 3:18
    
@max no... mbnoimi-pc is one of network PCs. BIND9 installed in 192.168.0.74 PC... the output of nslookup my.lan 192.168.0.74 is: mbnoimi@mbnoimi-pc ~ $ nslookup my.lan 192.168.0.74 Server: 192.168.0.74 Address: 192.168.0.74#53 Name: my.lan Address: 192.168.0.74 the content of /etc/resolv.conf which exist in PC 192.168.0.74 nameserver 192.168.0.74 –  mbnoimi Dec 25 '12 at 16:08
    
does that mean its working now? nslookup from mbnoimi-pc is replying with Address: 192.168.0.74 which is correct? your orginal question shows nslookup trying to query localhost for dns instead of 192.168.0.74 –  max Dec 25 '12 at 21:17
add comment

mbnoimi is trying to access a local nameserver at the loopback address 127.0.0.1. If (on mbnoimi) no local nameserver is running then /etc/resolv.conf contains the wrong information. If a local nameserver is running (on mbnoimi) then it is incorrectly configured.

share|improve this answer
add comment

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.