LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-03-2010, 01:21 AM   #1
dezio
LQ Newbie
 
Registered: Aug 2010
Posts: 13

Rep: Reputation: 0
Arrow DNS server failure


I have followed all the steps for configuring DNS on a fedora machinine, Am using Fedora 13, i have configured Cache and Master (primary)servers on the same machine. I haven't configured Slave. All testing commands are giving expected results but when i type 'host wxp.bitproject.com localhost' instead of giving me an IP address, Am getting the error "wxp.bitproject.com: not found:2 (SERVFAIL)"

What could be the problem?

Last edited by dezio; 09-03-2010 at 01:23 AM.
 
Old 09-03-2010, 01:38 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,

What dns are you trying to configure? If it's bind, could you post named.conf and the zone file for bitproject.com?
Also make sure it's not a SELinux problem, as you're running Fedora where SELinux is enabled by default

Regards
 
Old 09-03-2010, 03:03 AM   #3
dezio
LQ Newbie
 
Registered: Aug 2010
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by bathory View Post
Hi,

What dns are you trying to configure? If it's bind, could you post named.conf and the zone file for bitproject.com?
Also make sure it's not a SELinux problem, as you're running Fedora where SELinux is enabled by default

Regards


THE NAMED.CONF FOR 'bitproject.com'

//
// named.conf
//
// Provided by Red Hat bind 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.
//

options {

listen-on port 53 { 127.0.0.1; };
listen-on-v6 port 53 { ::1; };
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";
allow-query { localhost; };
recursion yes;

dnssec-enable yes;
dnssec-validation yes;
dnssec-lookaside auto;

/* Path to ISC DLV key */
bindkeys-file "/etc/named.iscdlv.key";
};

logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};

zone "." IN {
type hint;
file "named.ca";
};

zone "bitproject.com" IN {
type master;
file "project.com";
};


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

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

zone "1.0.0.127.in-addr.arpa" IN {
type master;
file "named.loopback";
allow-update { none; };
};

//include "/etc/named.rfc1912.zones";
Type :quit<Enter> to exit Vim

Last edited by dezio; 09-03-2010 at 03:07 AM.
 
Old 09-03-2010, 03:57 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
Where is the zone file? You can post it with the IP addresses masked if don't want to reveal them.
Re. named.conf, it looks good apart from the fact that using:
Quote:
listen-on port 53 { 127.0.0.1; };
listen-on-v6 port 53 { ::1; };
bind will listen only on the loopback interface and it cannot be used by other computers.
Also along with the zone file, post the complete output of
Code:
dig wxp.bitproject.com @127.0.0.1
 
Old 09-03-2010, 04:27 AM   #5
dezio
LQ Newbie
 
Registered: Aug 2010
Posts: 13

Original Poster
Rep: Reputation: 0
Arrow

Quote:
Originally Posted by bathory View Post
Where is the zone file? You can post it with the IP addresses masked if don't want to reveal them.
Re. named.conf, it looks good apart from the fact that using:
bind will listen only on the loopback interface and it cannot be used by other computers.
Also along with the zone file, post the complete output of
Code:
dig wxp.bitproject.com @127.0.0.1

THE ZONE FILES


1. For named.localhost

$TTL 1D
@ IN SOA @ rname.invalid. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
NS @
A 127.0.0.1
AAAA ::1

~
"named.localhost" 13L, 161C



2. For named .loopback

$TTL 1D
@ IN SOA @ rname.invalid. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
NS @
A 127.0.0.1
AAAA ::1
PTR localhost.

~
"named.loopback" 12L, 175C

THE IP ADDRESS WE ARE USING ARE 192.168.0.2 for bitproject.com



THE COMPLETE OUTPUT FOR dig wxp.bitproject.com @127.0.0.1


root@localhost etc]# dig wxp.bitproject.com @127.0.0.1

; <<>> DiG 9.7.0-P1-RedHat-9.7.0-9.P1.fc13 <<>> wxp.bitproject.com @127.0.0.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 64591
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;wxp.bitproject.com. IN A

;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Fri Sep 3 11:14:21 2010
;; MSG SIZE rcvd: 36

[root@localhost etc]#

Last edited by dezio; 09-03-2010 at 04:36 AM.
 
Old 09-03-2010, 04:48 AM   #6
sem007
Member
 
Registered: Nov 2006
Distribution: RHEL, CentOS, Debian Lenny, Ubuntu
Posts: 638

Rep: Reputation: 113Reputation: 113
make change suggest by bathory

Code:
listen-on port 53 { 192.168.0.2; };
also make change in forward and reverse zone file.

In both zone file.
Code:
@ IN SOA FQDN. DOMAIN-NAME. (
forward zone file
Code:
IN NS FQDN
IN A 192.168.0.2
server-name IN A 192.168.0.2
reverse zone file
Code:
IN NS FQDN
2 IN PTR server-name
FQDN = full name of server i.e server.bitproject.com
i assume your server ip is 192.168.0.2

Last edited by sem007; 09-03-2010 at 04:51 AM. Reason: add configuratin
 
Old 09-03-2010, 05:13 AM   #7
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
1. Comment out the listen-on directives, or use:
Code:
 listen-on {any;};
2. Regarding the SOA record and the zone file in general. You should post the project.com file, but anyway try this:
Code:
$TTL 1D
@ IN SOA ns.bitproject.com rname.invalid. (
1 ; serial  <---MUST BE INCREASED ON EVERY CHANGE
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
@ NS ns.bitproject.com.
ns.bitproject.com. IN A x.x.x.x
wxp.bitproject.com. IN A y.y.y.y
 
Old 09-03-2010, 05:57 AM   #8
dezio
LQ Newbie
 
Registered: Aug 2010
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by bathory View Post
1. Comment out the listen-on directives, or use:
Code:
 listen-on {any;};
2. Regarding the SOA record and the zone file in general. You should post the project.com file, but anyway try this:
Code:
$TTL 1D
@ IN SOA ns.bitproject.com rname.invalid. (
1 ; serial  <---MUST BE INCREASED ON EVERY CHANGE
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
@ NS ns.bitproject.com.
ns.bitproject.com. IN A x.x.x.x
wxp.bitproject.com. IN A y.y.y.y
Elaborate on 1;serial ----MUST BE INCREASED ON EVERY CHANGE

and on ns.bitproject.com IN x.x.x.x what do "IN Ax.x.x.x"
and " IN A y.y.y.y" mean?
 
Old 09-03-2010, 06:09 AM   #9
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
The serial number must be increased every time you change something in the zone file. Doing so, when you reload bind it will read the changes in the zone.
x.x.x.x and y.y.y.y should be replaced by the IP addresses of the 2 hosts.

PS: I suggest you to read some documentation about configuring dns
 
Old 09-03-2010, 09:05 AM   #10
sem007
Member
 
Registered: Nov 2006
Distribution: RHEL, CentOS, Debian Lenny, Ubuntu
Posts: 638

Rep: Reputation: 113Reputation: 113
@ dezio

Have a look configuration files of my test BIND server on centos 5.1
10.0.3.56 is my dns server and 10.0.3.55 is one clinet

/var/named/chroot/etc/named.conf

Code:
options {
        listen-on port 53 { 127.0.0.1; 10.0.3.56; };
//      listen-on-v6 port 53 { ::1; };
        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     { localhost; 10.0.0.0/20; };
};
logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};
view localhost_resolver {
        match-clients      { localhost; 10.0.0.0/20; };
        match-destinations { localhost; 10.0.0.0/20; };
        recursion yes;
        include "/etc/named.rfc1912.zones";
zone "example.com" IN {
        type master;
        file "example.zone";
        allow-update { none; };
};
zone "3.0.10.in-addr.arpa" IN {
        type master;
        file "example.local";
        allow-update { none; };
};

};
forward zone file /var/named/chroot/var/named/example.zone

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

                IN NS           server.example.com.
                IN A            10.0.3.56
server          IN A            10.0.3.56
station1        IN A            10.0.3.55
reverse zone file /var/named/chroot/var/named/example.local

Code:
$TTL    86400
@       IN      SOA     server.example.com. root.example.com.  (
                                      1997022700 ; Serial
                                      28800      ; Refresh
                                      14400      ; Retry
                                      3600000    ; Expire
                                      86400 )    ; Minimum
        IN      NS      server.example.com.
56      IN      PTR     server.example.com.
55      IN      PTR     station1.example.com.
 
  


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
help needed to setup a DNS server can anyone say how to configure a DNS server subha Linux - Networking 4 04-27-2012 11:50 PM
how to configure another dns server to combine use with primary current dns server. hocheetiong Linux - Newbie 1 05-29-2008 06:57 PM
LXer: Find out DNS Server Version With DNS Server Fingerprinting Tool LXer Syndicated Linux News 0 12-21-2007 05:30 PM
LXer: Find out DNS Server Version With DNS Server Fingeprinting Tool LXer Syndicated Linux News 0 12-21-2007 04:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:55 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