LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   error "server can't find 254.0.168.192.in-addr.arpa: SERVFAIL" in dns server (https://www.linuxquestions.org/questions/linux-server-73/error-server-cant-find-254-0-168-192-in-addr-arpa-servfail-in-dns-server-855119/)

piyusharora420 01-09-2011 02:52 AM

error "server can't find 254.0.168.192.in-addr.arpa: SERVFAIL" in dns server
 
hi everybody,
nslookup command is giving me an error.otherwise dns is working ok.when i try to look for server from client using
Code:

nslookup 192.168.0.254
i got the following error :-
Code:

** server can't find 254.0.168.192.in-addr.arpa: SERVFAIL
but
Quote:

ping server.example.com
is working fine.
i think there should be problem in reverse zone file so i am posting my reverse zone file

Code:

$TTL    86400
@      IN      SOA    example.com. root.server.example.com.  (
                                      1997022701 ; Serial
                                      28800      ; Refresh
                                      14400      ; Retry
                                      3600000    ; Expire
                                      86400 )    ; Minimum
        IN      NS              server.example.com
254    IN      PTR            server.example.com.
1      IN      PTR            client1.example.com.
2      IN      PTR            client2.
3      IN      PTR            client3.example.com.

please tell me what is meaning of this error?

bathory 01-09-2011 03:17 AM

Hi,

You miss the trailing dot in the NS record:
Code:

        IN      NS              server.example.com.
Regards

piyusharora420 01-09-2011 03:22 AM

i have checked with trailing dot and without trailing dot.its not affection at all.service restarts successfuly.

bathory 01-09-2011 03:29 AM

The trailing dot is needed. Otherwise the zone name is attached in the hostname, so what you catually have is: " IN NS server.example.com.0.168.192.in-addr.arpa".
The service starts succesfully, because this is not a syntax error in the configuration, but an error in the zone file.
Note that you need to increase the serial number and reload bind.

piyusharora420 01-09-2011 03:35 AM

i have increased serial number already.trailing dot is also there.but still got the same error.how to reload bind?

bathory 01-09-2011 03:41 AM

You can either restart the service, or use
Code:

rndc reload

piyusharora420 01-09-2011 03:44 AM

yea i have done that.still got same error.

piyusharora420 01-09-2011 03:45 AM

my named.conf file is

Quote:

options {
directory "/var/named/";
};

zone "example.com" IN
{ type master;
file "example.com.zone";
allow-transfer{192.168.0.0/24;};
};

zone "0.168.192.in-addr.arpa.zone" IN
{
type master;
file "0.168.192.in-addr.arpa.zone";
};

bathory 01-09-2011 03:49 AM

Oups, you have another error in the SOA record of zone file. It should be:
Code:

@      IN      SOA    server.example.com. root.server.example.com. (

piyusharora420 01-09-2011 03:54 AM

i have done this edit to.but still same error.
my /etc/hosts file of server is

Quote:

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 server.example.com server localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
192.168.0.2 client2 client2
192.168.0.254 server.example.com server.example.com
192.168.0.3 client3.example.com client3.example.com
192.168.0.1 client1.example.com client1.example.com
my /etc/resolv.conf of server is

Quote:

search example.com
nameserver 192.168.0.254
my /etc/reslov.conf of client side is

Quote:

search example.com
nameserver 192.168.0.254

bathory 01-09-2011 04:02 AM

Hmm, another error in named.conf.
Replace:
Quote:

zone "0.168.192.in-addr.arpa.zone" IN
with:
Code:

zone "0.168.192.in-addr.arpa" IN

piyusharora420 01-09-2011 04:07 AM

yes now nslookup is working fine.i have spent 3 days on this stupid silly mistake.thanx alot bathory.i want to ask one thing more.is it make difference if i use
Quote:

example.com.
instead of
Quote:

server.example.com
in reverse zone file?

bathory 01-09-2011 04:12 AM

If example.com. can be resolved (i.e. you have an A record in the forward zone for example.com), then you can use it. Of course you need to change both SOA and NS records accordingly.

Please use "Thread Tools" and mark the thread as "SOLVED"

Regards

piyusharora420 01-09-2011 04:18 AM

my forward zone file is

Quote:

$TTL 86400
@ IN SOA example.com. root (
43 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum

@ NS server.example.com
server A 192.168.0.254
client1 A 192.168.0.1
client2 A 192.168.0.2
client3 A 192.168.0.3

i have used example.com as SOA record and server.example.com as ns record here.so it means i can use example.com instedad of server.example.com in reverse zone error?

bathory 01-09-2011 07:33 AM

Quote:

i have used example.com as SOA record and server.example.com as ns record here.so it means i can use example.com instedad of server.example.com in reverse zone error?
As I've already told if you want to do this you need to give example.com an A record. So the forward zone should look like this:
Code:

$TTL 86400
@ IN SOA server.example.com. root.server.example.com. (
44 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum

@ NS server.example.com.
example.com. A 192.168.0.254
server A 192.168.0.254
client1 A 192.168.0.1
client2 A 192.168.0.2
client3 A 192.168.0.3

Then in reverse zone the following should work:
Code:

  IN      NS      example.com.
Cheers


All times are GMT -5. The time now is 11:15 AM.