LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-01-2011, 05:44 PM   #1
Widgeteye
Member
 
Registered: Mar 2005
Posts: 130

Rep: Reputation: 17
Having hell setting up caching Name server using bind


Here's the skinny:

I went to the DNS HOWTO at http://www.langfeldt.net/DNS-HOWTO/B...S-HOWTO-3.html and followed the instructions, for 2 days now, and have gotten no where. So I'm going to post the relevent stuff and see if someone can see what's going wrong.

Here's the named.conf:

Code:
options {
directory "/var/named";
/*
* 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 uses an unprivileged
* port by default.
*/
//query-source address * port 53;
};

controls {
inet 127.0.0.1 allow { localhost; } keys { rndc_key; };
};

key "rndc_key" {
algorithm hmac-md5;
secret "c3Ryb25nIGVub3VnaCBmb3IgYSBtYW4gYnV0IG1hZGUgZm9yIGEgd29tYW4K";
};

zone "." {
type hint;
file "root.hints";
};

zone "0.0.127.in-addr.arpa" {
type master;
file "pz/127.0.0";
};
And the zone file:

Code:
$TTL 3D
@          IN      SOA     ns.linux.bogus. hostmaster.linux.bogus. (
1       ; Serial
8H      ; Refresh
2H      ; Retry
4W      ; Expire
1D)     ; Minimum TTL
NS      ns.linux.bogus.
1       PTR     localhost.
and the rndc.conf file:

Code:
key rndc_key {
algorithm "hmac-md5";
secret "c3Ryb25nIGVub3VnaCBmb3IgYSBtYW4gYnV0IG1hZGUgZm9yIGEgd29tYW4K";
};

options {
default-server localhost;
default-key    rndc_key;
};
and when I run dig -x 127.0.0.1 I get the following:

Code:
; <<>> DiG 9.8.0 <<>> -x 127.0.0.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 41960
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;1.0.0.127.in-addr.arpa.                IN      PTR

;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Fri Apr  1 17:34:46 2011
;; MSG SIZE  rcvd: 40
Notice the servfail in the top line

And when I run named-compilezone -o out 127.0.0.1 127.0.0
I get the following:

Code:
127.0.0:8: unknown RR type 'ns.linux.bogus.'
zone localhost/IN: loading from master file 127.0.0 failed: unknown class/type
zone localhost/IN: not loaded due to errors.
Any help greatly appreciated.
 
Old 04-02-2011, 08:28 AM   #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
Hi,

You get this because you don't have at least one blank space if front of NS in the NS RR
Code:
$TTL 3D
@          IN      SOA     ns.linux.bogus. hostmaster.linux.bogus. (
1       ; Serial
8H      ; Refresh
2H      ; Retry
4W      ; Expire
1D)     ; Minimum TTL
    NS      ns.linux.bogus.
;^There must be at least 1 blank space
1       PTR     localhost.
PS. You need the forward zone linux.bogus where you should give an A RR for ns.linux.bogus.
PPS. This is not a caching-olny dns, as it's also authoritative for one or more zones. For a caching-only dns all you need it the hint zone

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
Caching-only name server to forward queries-Bind vwtech Linux - Software 1 02-14-2011 04:32 PM
Strange results with local BIND caching name-server pixel_surgeon Linux - Server 2 04-04-2009 09:05 AM
Setting up BIND DNS server on Ubuntu server tanu221984 Linux - Software 2 04-13-2007 11:36 AM
Setting Up A Caching DNS Server on a Private Network kaplan71 Linux - Networking 4 04-25-2006 04:53 PM
Info on setting up internal web/dns caching server. l0f33t Linux - Networking 1 05-25-2003 09:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:17 AM.

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