Solved

Query refused on bind (named)

Posted on 2007-03-19
18
16,870 Views
Last Modified: 2013-12-16
Hi there

Having a huge problem and I can't figure out why this keeps happening:

dig r-nash.office.protected.com @192.168.2.2

; <<>> DiG 9.3.4 <<>> r-nash.office.protected.com @192.168.2.2
; (1 server found)
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: REFUSED, id: 65269
;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;r-nash.office.protected.com.   IN      A

;; Query time: 1 msec
;; SERVER: 192.168.2.2#53(192.168.2.2)
;; WHEN: Mon Mar 19 12:07:12 2007
;; MSG SIZE  rcvd: 45




I keep getting "refused" when I try to query this server from anywhere on the network, but everything works fine when I try the same query on the server that is running the BIND service.

What is causing this please? I have tried and tried and tried, but I keep getting this.

Here is my named.conf file

//
// named.caching-nameserver.conf
//
// Provided by Red Hat caching-nameserver package to configure the
// ISC BIND named(8) DNS server as a caching only nameserver
// (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
// DO NOT EDIT THIS FILE - use system-config-bind or an editor
// to create named.conf - edits to this file will be lost on
// caching-nameserver package upgrade.
//
options {
        listen-on port 53 { 127.0.0.1; };
        listen-on-v6 port 53 { ::1; };
        listen-on port 53 { 192.168.2.2; };
        directory       "/var/named";
        dump-file       "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        memstatistics-file "/var/named/data/named_mem_stats.txt";
        query-source    port 53;
        query-source-v6 port 53;
        allow-query     { any; };
};
logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};
view localhost_resolver {
        allow-query { any; };
        match-clients      { localhost; };
        match-destinations { localhost; };
        recursion yes;
        include "/etc/named.rfc1912.zones";
};


Here is my rfc zone file:

// named.rfc1912.zones:
//
// Provided by Red Hat caching-nameserver package
//
// ISC BIND named zone configuration for zones recommended by
// RFC 1912 section 4.1 : localhost TLDs and address zones
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
zone "1.168.192.IN-ADDR.ARPA." IN {
        type master;
        file "192.168.1.db";
        allow-query { any; };
};
zone "2.168.192.IN-ADDR.ARPA." IN {
        type master;
        file "192.168.2.db";
        allow-query { any; };
};
zone "office.protected.com." IN {

allow-query {
        any;
};
type master;
        file "office.protected.com.db";
};
zone "." IN {

type hint;
        file "named.ca";
};

zone "localdomain" IN {
        type master;
        file "localdomain.zone";
        allow-update { none; };
        allow-query { any; };
};

zone "localhost" IN {
        type master;
        file "localhost.zone";
        allow-update { none; };
        allow-query { any; };
};

zone "0.0.127.in-addr.arpa" IN {
        allow-query {
        any;
};
type master;
        file "named.local";
        allow-update { none; };
};

zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
        type master;
        file "named.ip6.local";
        allow-query { any; };
};

zone "255.in-addr.arpa" IN {
        type master;
        file "named.broadcast";
        allow-update { none; };
        allow-query { any; };
};

zone "0.in-addr.arpa" IN {
        type master;
        file "named.zero";
        allow-update { none; };
        allow-query { any; };
};


And here is my main zone file:

$TTL 1H
@       SOA     development     root.development (      6
                                                3H
                                                1H
                                                1W
                                                1H )
                        NS      localhost.
m-whelan        IN      1H      A       192.168.2.240
t-ward  IN      1H      A       192.168.2.20
k-rosewarne IN  1H      A       192.168.2.14
a-pieters       IN      1H      A       192.168.2.9
development     IN      1H      A       192.168.2.2
        IN      1H      A       192.168.2.2
printer IN      1H      A       192.168.2.245
b-stabb IN      1H      A       192.168.2.13

t-legg  IN      1H      A       192.168.1.5
d-walker        IN      1H      A       192.168.1.6
a-sundaram      IN      1H      A       192.168.1.7
a-cox   IN      1H      A       192.168.1.8
r-abzadeh       1H      A       192.168.1.9
a-cross IN      1H      A       192.168.1.10
m-harrison      IN      1H      A       192.168.1.11
d-carter        IN      1H      A       192.168.1.12
j-irish IN      1H      A       192.168.1.13
r-nash  IN      1H      A       192.168.1.14
printer2        IN      1H      A       192.168.1.254
phpmyadmin.development  IN      1H      CNAME   development
r-nash  IN      1H      A       192.168.1.14
admin.development       IN      1H      CNAME   development
sd.development  IN      1H      CNAME   development
cp.development  IN      1H      CNAME   development
secure.development      IN      1H      CNAME   development
client.development      IN      1H      CNAME   development
test.development        IN      1H      CNAME   development
sales.development       IN      1H      CNAME   development
support.development     IN      1H      CNAME   development
samsung IN      1H      CNAME   printer
0
Comment
Question by:x_terminat_or_3
  • 7
  • 6
18 Comments
 
LVL 14

Expert Comment

by:pablouruguay
ID: 18747886
just a question.. . you dont have a firewall or block the port 53 in this server ???

do a iptables -L to see what are in your server
0
 
LVL 2

Author Comment

by:x_terminat_or_3
ID: 18748201
No, software firewall is disabled

iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
0
 
LVL 14

Expert Comment

by:pablouruguay
ID: 18749756
please remove this 3 lines and restart named and try again please

        listen-on port 53 { 127.0.0.1; };
        listen-on-v6 port 53 { ::1; };
        listen-on port 53 { 192.168.2.2; };
0
 
LVL 2

Author Comment

by:x_terminat_or_3
ID: 18750137
I removed those lines but I still get the refused bit
0
 
LVL 14

Expert Comment

by:pablouruguay
ID: 18750187
i didnt see the error....

maybe can teste removing with # the lines on query.. to accept any query... only for checking
0
 
LVL 2

Author Comment

by:x_terminat_or_3
ID: 18750535
where do I do that?
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
LVL 14

Accepted Solution

by:
pablouruguay earned 200 total points
ID: 18750613
in the named.conf comment all  

allow-query     { any; };

like this

#allow-query     { any; };

and restart named with /etc/init.d/named restart
0
 
LVL 2

Author Comment

by:x_terminat_or_3
ID: 18751316
I FIXED IT!

The problem was this:

view localhost_resolver {
        allow-query { any; };
        match-clients      { localhost; };
        match-destinations { localhost; };
        recursion yes;
        include "/etc/named.rfc1912.zones";
};

I changed the match-clients , and match-destinations to any, and now it works it works!
0
 
LVL 2

Author Comment

by:x_terminat_or_3
ID: 18751519
I'll award you some points but the actual answer was self-found, so please be patient while admin deals with this.

Thank you for your help
0
 
LVL 14

Expert Comment

by:pablouruguay
ID: 18756636
nice :)....  i learned in this question... thank you
0
 
LVL 14

Expert Comment

by:pablouruguay
ID: 18815250
paq and refunded??? i dont understand...
0
 
LVL 2

Author Comment

by:x_terminat_or_3
ID: 18818561
Looks like I misunderstood what was being asked. I have amended the thread mentioned by Vee_Mod to get you points.

Thanks for your help
0
 
LVL 2

Author Comment

by:x_terminat_or_3
ID: 18821933
No this is exactly what I wanted. Thanks Vee_Mod
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Join & Write a Comment

Suggested Solutions

I've written instructions for one router type, but this principle may be useful for others of the same brand and even other brands of router. Problem: I had an issue especially with mobile devices that refused to use DNS information supplied via…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now