Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
06-11-2013, 02:18 PM
|
#1
|
LQ Newbie
Registered: Jun 2013
Posts: 2
Rep: 
|
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!
|
|
|
06-11-2013, 03:46 PM
|
#2
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,221
|
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
|
|
|
06-11-2013, 05:35 PM
|
#3
|
LQ Newbie
Registered: Jun 2013
Posts: 2
Original Poster
Rep: 
|
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
|
|
|
06-12-2013, 02:18 AM
|
#4
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,221
|
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
|
|
|
All times are GMT -5. The time now is 02:09 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|