LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-11-2013, 02:18 PM   #1
sfpcservice
LQ Newbie
 
Registered: Jun 2013
Posts: 2

Rep: Reputation: Disabled
Bind9 Configuration help... Slow DNS and Servfail on Host lookups


Hello everyone:

I am replacing an exchange/DHCP/DNS server with an ubuntu zimbra machine. I am having a hard time setting up the configuration files in Bind and am getting really slow webpage lookups and reverse DNS failures. Here are my configuration files:

named.conf.local

# This is the zone definition. replace example.com with your domain name
zone "robandsarah.net" {
type master;
file "/etc/bind/zones/robandsarah.net.db";
};

# This is the zone definition for reverse DNS. replace 0.168.192 with your network address in reverse notation - e.g my network address is 192.168.0
zone "0.0.10.in-addr.arpa" {
type master;
file "/etc/bind/zones/rev.0.0.10.in-addr.arpa";
};

//
// Do any local configuration here
//

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

named.conf.options

options {
directory "/var/cache/bind";

// If there is a firewall between you and nameservers you want
// to talk to, you might need to uncomment the query-source
// directive below. Previous versions of BIND always asked
// questions using port 53, but BIND 8.1 and later use an unprivileged
// port by default.

query-source address * port 53;

// If your ISP provided one or more IP addresses for stable
// nameservers, you probably want to use them as forwarders.
// Uncomment the following block, and insert the addresses replacing
// the all-0's placeholder.

forward first; forwarders {
10.0.0.1;

};

//auth-nxdomain no; //# conform to RFC1035
//listen-on-v6 { any; };
};


robandsarah.net.db

;
; BIND data file for robandsarah.net
;
$TTL 604800
@ IN SOA mail.robandsarah.net. admin.robandsarah.net. (
070727 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS 10.0.0.15
IN MX 10.0.0.15
IN A 10.0.0.15
server IN A 10.0.0.15

rev.0.0.10.in-addr.arpa

//replace example.com with yoour domain name, ns1 with your DNS server name.
// The number before IN PTR example.com is the machine address of the DNS server. in my case, it's 1, as my IP address is 192.168.0.1.
@ IN SOA server.robandsarah.net. admin.robandsarah.net. (
2006081402; Serial
28800;
604800;
604800;
86400
)

IN NS server.robandsarah.net
15 IN PTR server.robandsarah.net



I know there are some errors here but I have been chasing my tail for a couple of days. Can someone please help me get this cleaned up? When I do a host 10.0.0.15 in terminal I get a servfail error and dig -x times out.

Thanks in advance for the help!
 
Old 06-11-2013, 03:46 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
You have some errors in your config
First you don't need the following
Quote:
query-source address * port 53;

// If your ISP provided one or more IP addresses for stable
// nameservers, you probably want to use them as forwarders.
// Uncomment the following block, and insert the addresses replacing
// the all-0's placeholder.

forward first; forwarders {
10.0.0.1;

};
It's better for security reasons to use random source ports and of course you don't need forwarders since you're trying to setup an aithoritative nameserver.

The zone files also contain errors. In the forward zone you should use FQDNs for the MX and NS RRs:
Code:
@ IN NS server.robandsarah.net.
    IN MX server.robandsarah.net.
    IN A 10.0.0.15
server IN A 10.0.0.15
In the reverse zone you miss the trailing dots:
Code:
     IN NS server.robandsarah.net.
15 IN PTR server.robandsarah.net.
Don't forget to increase the serial and reload bind

Regards
 
Old 06-11-2013, 05:35 PM   #3
sfpcservice
LQ Newbie
 
Registered: Jun 2013
Posts: 2

Original Poster
Rep: Reputation: Disabled
Ok, I fixed the above. Here is the readout from dig -x now:

rob@server:~$ dig -x robandsarah.net

; <<>> DiG 9.9.3-P1 <<>> -x robandsarah.net
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 45006
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;net.robandsarah.in-addr.arpa. IN PTR

;; AUTHORITY SECTION:
in-addr.arpa. 3600 IN SOA b.in-addr-servers.arpa. nstld.iana.org. 2011028653 1800 900 604800 3600

;; Query time: 918 msec
;; SERVER: 10.0.0.15#53(10.0.0.15)
;; WHEN: Tue Jun 11 15:22:00 PDT 2013
;; MSG SIZE rcvd: 125

I get a different readout when I dig -x 10.0.0.15

rob@server:~$ dig -x 10.0.0.15

; <<>> DiG 9.9.3-P1 <<>> -x 10.0.0.15
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 37813
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;15.0.0.10.in-addr.arpa. IN PTR

;; Query time: 0 msec
;; SERVER: 10.0.0.15#53(10.0.0.15)
;; WHEN: Tue Jun 11 15:36:52 PDT 2013
;; MSG SIZE rcvd: 51

And when I dig -x 127.0.0.1

rob@server:~$ dig -x 127.0.0.1

; <<>> DiG 9.9.3-P1 <<>> -x 127.0.0.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 64541
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 3

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;1.0.0.127.in-addr.arpa. IN PTR

;; ANSWER SECTION:
1.0.0.127.in-addr.arpa. 604800 IN PTR localhost.

;; AUTHORITY SECTION:
127.in-addr.arpa. 604800 IN NS localhost.

;; ADDITIONAL SECTION:
localhost. 604800 IN A 127.0.0.1
localhost. 604800 IN AAAA ::1

;; Query time: 0 msec
;; SERVER: 10.0.0.15#53(10.0.0.15)
;; WHEN: Tue Jun 11 15:37:18 PDT 2013
;; MSG SIZE rcvd: 132



And from host 10.0.0.15 in termianl:


rob@server:~$ host 10.0.0.15
Host 15.0.0.10.in-addr.arpa not found: 2(SERVFAIL)




Obviously I'm getting more info out of dig, but still nothing when I try the host 10.0.0.15. Is this to be expected or do I need to make some other changes? I am still getting slow webpage loads and timeouts.

Last edited by sfpcservice; 06-11-2013 at 05:39 PM. Reason: Added more info
 
Old 06-12-2013, 02:18 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
dig -x robandsarah.net
That's wrong. You don't use -x for forward lookups. Use:
Code:
dig robandsarah.net
Quote:
; <<>> DiG 9.9.3-P1 <<>> -x 10.0.0.15
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 37813
You get a SERVFAIL, meaning there is some error(s) in your configuration.
Post here the new reverse zone file, using CODE tags for readability.
You can also check the reverse zone for errors using:
Code:
named-checkzone 0.0.10.in-addr.arpa /etc/bind/zones/rev.0.0.10.in-addr.arpa
Regards
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bind9 ,host does reslove a dns name but ping says unknown host Byenary Linux - Networking 10 01-12-2011 01:33 AM
Slow DNS Lookups JustinK101 Linux - Software 1 01-29-2007 06:48 PM
slow DNS lookups using Novatel V620 gpetme Linux - Wireless Networking 4 05-06-2006 10:55 AM
DNS Lookups Slow kwiksand Linux - Networking 0 11-15-2004 04:52 AM
Mysterious DNS Lookups on private host neiljt Linux - Security 3 08-31-2004 07:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration