Super User is a question and answer site for computer enthusiasts and power users. 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 need to use a Debian system for a project. I configured many DNS servers on Ubuntu server without problem, but now I have a big one...

Impossible to find a solution on others discussion so I ask here. Here are my configuration files :

/etc/bind/named.conf.local(which is included in named.conf)

//
// Do any local configuration here
//

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

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

// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";

/etc/bind/zones/db.project.lan

;
; BIND data file for local loopback interface
;
$TTL    604800
project.lan     IN      SOA     master1.project.lan. post.project.lan. (
                           2308         ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                         604800 )       ; Negative Cache TTL
;
project.lan     IN      NS      master1.project.lan
$ORIGIN project.lan

master1 IN      A       192.168.1.24
master2 IN      A       192.168.1.25
data1   IN      A       192.168.1.26
data2   IN      A       192.168.1.27

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

;
; BIND reverse data file for local loopback interface
;
$TTL    604800
@       IN      SOA     master1.project.lan post.project.lan. (
                              1         ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                         604800 )       ; Negative Cache TTL
;
        IN      NS      master1.project.lan
25      IN      PTR     master2.project.lan
26      IN      PTR     data1.project.lan
27      IN      PTR     data2.project.lan

This is for bind configuration. I tried the following commands :

ping master1 -> Successful (hostname is master1 and FQDN is master1.project.lan so it's not relative to DNS)

ping googe.fr -> Successful

ping 192.168.1.25 (master2 ip) -> Successful ping master2 -> ping: unknown host master2

host master2 -> Host master2 not found: 3(NXDOMAIN)

I tried nslookup too ->

nslookup
> server master1
Default server: master1
Address: 127.0.0.1#53
Default server: master1
Address: 127.0.1.1#53
> master2
;; Got SERVFAIL reply from 127.0.0.1, trying next server
;; connection timed out; no servers could be reached
> master2
;; Got SERVFAIL reply from 127.0.0.1, trying next server

Earlier in my configuration process, I had a successful nslookup, but no ping/host.

All the servers are in static IP address.

Here are my resolv.conf and host.conf :

host.conf

order bind, hosts
multi on

resolv.conf

nameserver 127.0.0.1
search project.lan

Any idea of the problem ? I can't ping from the server or any machine in the domain. I tried 1000000 fix methods for the problem, I probably made a mistake in a configuration file...

The bind and network restart command are OK.

Thanks for reading :)

Little precision, when I use nslookup with the server's local IP I have this output :

> server 192.168.1.24
Default server: 192.168.1.24
Address: 192.168.1.24#53
> master2
Server:         192.168.1.24
Address:        192.168.1.24#53

** server can't find master2: NXDOMAIN

And result of host -v master1

Trying "master2.project.lan"
Trying "master2"
Host master2 not found: 3(NXDOMAIN)
Received 100 bytes from 127.0.0.1#53 in 0 ms
share|improve this question
    
what about your firewall? Is it enabled? Can you ping data[1-2] ? – Danduk82 Feb 17 '14 at 23:46
    
Yes, I can ping with the IP address, I have not configured any firewall :) – Zlatan Feb 18 '14 at 12:34

Try

;
; BIND data file for local loopback interface
;
$TTL    604800
@     IN      SOA     master1.project.lan. post.project.lan. (
                       2308         ; Serial
                     604800         ; Refresh
                      86400         ; Retry
                    2419200         ; Expire
                     604800 )       ; Negative Cache TTL
;
@     IN      NS      master1.project.lan.
$ORIGIN project.lan
;
master1 IN      A       192.168.1.24
master2 IN      A       192.168.1.25
data1   IN      A       192.168.1.26
data2   IN      A       192.168.1.27

and

;
; BIND reverse data file for local loopback interface
;
$TTL    604800
@       IN      SOA     master1.project.lan post.project.lan. (
                          1         ; Serial
                     604800         ; Refresh
                      86400         ; Retry
                    2419200         ; Expire
                     604800 )       ; Negative Cache TTL
;
@    IN      NS      master1.project.lan.
25      IN      PTR     master2.project.lan.
26      IN      PTR     data1.project.lan.
27      IN      PTR     data2.project.lan.

In the above, I've used some short-hand and have added a period to the end of "project.lan".

share|improve this answer
    
I tried with you modifications, no result after restarting bind, I can ping the IPs but not the names :) – Zlatan Feb 18 '14 at 12:36
    
Is /etc/resolv.conf set properly? Did you restart the DNS server after chaiing the above (you also need to increment the serial)? – joat Feb 19 '14 at 2:51

Ok, I resolved my problem. I looked at my syslog file, there was a conflict with the $ORIGIN changing the zone root, impossible for my machine to find master1 after the $ORIGIN, like if every record was hidden.

If anyone have a more precise explanation, I would be happy to read it..

Thanks

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .