LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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-15-2008, 03:19 PM   #1
diegom31
LQ Newbie
 
Registered: Apr 2008
Posts: 7

Rep: Reputation: 0
How to configure bind server


Hey,

first I'm very sorry for my bad english.

I just install my new bind server at home for testing and learning.
nslookup on the server linux machine looks good but when I tried nslookup from windows machine I got error ... I think that problem is PTR and I don't know where I wrong?

Linux Machine:

Code:
nslookup mydomain.loc
Server:         192.168.10.31
Address:        192.168.10.31#53

Name:   mydomain.loc
Address: 192.168.10.31
Windows XP:
Code:
C:\Documents and Settings\xp>nslookup mydomain.loc
*** Can't find server name for address 192.168.10.31: No response from server
*** Default servers are not available
Server:  UnKnown
Address:  192.168.10.31

*** UnKnown can't find mydomain.loc: No response from server

My configuration files

named.conf :

Code:
// Red Hat BIND Configuration Tool
//
// Default initial "Caching Only" name server configuration
//

acl my_lan { 192.168.10.0/24; 127.0/8; };
options {
        directory "/var/named";
        dump-file "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        forwarders { dc1; dc2; };
        allow-query { my_lan; };
        /*
         * 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;
};

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

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

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

zone "0.0.127.in-addr.arpa." IN {
        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-update { none; };
};

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

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

# Forward Zone for mydomain.loc domain
zone "mydomain.loc" IN {
        type master;
        file "mydomain.loc.zone";
};

# Reverse Zone for mydomain.loc domain
zone "10.168.192.in-addr.arpa" IN {
        type master;
        file "10.168.192.in-addr.arpa";
};

include "/etc/rndc.key";
mydomain.loc.zone

Code:
$TTL 86400

@       IN      SOA  linux.mydomain.loc. root.localhost. (
                42       ; serial
                3H       ; refresh slaves
                15M      ; retry
                1W       ; expire
                1D )     ; Negative TTL


                        IN      NS      linux.mydomain.loc.
linux.mydomain.loc.     IN      A       192.168.10.31     ; RHEL server
;my.firewall.            IN      A       192.168.10.1      ; router
@                       IN      A       192.168.10.31     ; Allow nslookup mydomain.loc
Code:
$TTL 86400

@        IN      SOA  linux.mydomain.loc. root.localhost. (
                43       ; serial
                3H       ; refresh slaves
                15M      ; retry
                1W       ; expire
                1D )     ; Negative TTL

         IN     NS      linux.mydomain.loc.loc.
1        IN     PTR     linux.mydomain.loc.
Also I want to configure bind as master server, caching and forwarding server.
I installed caching-nameserver do I need to configure named.caching-nameserver.conf file ?

The default file for named.caching-nameserver.conf :
Code:
//
// 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; };
        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; };
};
logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};
view localhost_resolver {
        match-clients      { localhost; };
        match-destinations { localhost; };
        recursion yes;
        include "/etc/named.rfc1912.zones";
};
Thanks all

Last edited by diegom31; 04-15-2008 at 03:21 PM.
 
Old 04-15-2008, 07:10 PM   #2
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440

Rep: Reputation: 52
Quick question,

Is your linux firewall enabling blocking DNS requests?

-twantrd
 
Old 04-16-2008, 12:19 AM   #3
diegom31
LQ Newbie
 
Registered: Apr 2008
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by twantrd View Post
Quick question,

Is your linux firewall enabling blocking DNS requests?

-twantrd
Hey Thx for replay

The answer is no ..you can see for your self ( :
Code:
ACCEPT     udp  --  anywhere             anywhere            state NEW udp dpt:domain
Also disable the iptables not help ...
Thx

Last edited by diegom31; 04-16-2008 at 01:16 AM.
 
Old 04-16-2008, 09:03 PM   #4
eaglek96
LQ Newbie
 
Registered: Feb 2008
Location: Massachusetts
Distribution: Debian Linux and FreeBSD
Posts: 12

Rep: Reputation: 0
I'm wondering, what does the output of netstat -atun show? Is it showing the named daemon listening on port 53, or just on localhost? Sometimes named will only bind to the 127.0.0.1 address unless told to bind on another IP.

Also, I'm curious:

From the windows machine, instead of looking up the way you do, try doing:

c:\> nslookup
> server 192.168.10.31

>mydomain.loc
 
Old 04-16-2008, 09:48 PM   #5
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Also try telnetting from Windows

>telnet 192.168.10.31 53
 
Old 04-17-2008, 12:41 AM   #6
diegom31
LQ Newbie
 
Registered: Apr 2008
Posts: 7

Original Poster
Rep: Reputation: 0
Hey ,

Code:
netstat -atun
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address               Foreign Address             State
tcp        0      0 127.0.0.1:2208              0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:111                 0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:946                 0.0.0.0:*                   LISTEN
tcp        0      0 192.168.10.31:53            0.0.0.0:*                   LISTEN
tcp        0      0 127.0.0.1:53                0.0.0.0:*                   LISTEN
tcp        0      0 127.0.0.1:631               0.0.0.0:*                   LISTEN
tcp        0      0 127.0.0.1:953               0.0.0.0:*                   LISTEN
tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN
tcp        0      0 127.0.0.1:6010              0.0.0.0:*                   LISTEN
tcp        0      0 127.0.0.1:6011              0.0.0.0:*                   LISTEN
tcp        0      0 127.0.0.1:2207              0.0.0.0:*                   LISTEN
tcp        1      0 192.168.10.31:42389         137.226.33.58:80            CLOSE_WAIT
tcp        1      0 192.168.10.31:42881         134.109.132.16:80           CLOSE_WAIT
tcp        1      0 192.168.10.31:49873         129.143.116.10:80           CLOSE_WAIT
tcp        1      0 192.168.10.31:59170         204.15.73.243:80            CLOSE_WAIT
tcp        1      0 192.168.10.31:59168         204.15.73.243:80            CLOSE_WAIT
tcp        1      0 192.168.10.31:59174         204.15.73.243:80            CLOSE_WAIT
tcp        1      0 192.168.10.31:59172         204.15.73.243:80            CLOSE_WAIT
tcp        0      0 :::22                       :::*                        LISTEN
tcp        0      0 ::1:953                     :::*                        LISTEN
tcp        0      0 ::1:6010                    :::*                        LISTEN
tcp        0      0 ::1:6011                    :::*                        LISTEN
tcp        0    132 ::ffff:192.168.10.31:22     ::ffff:192.168.10.2:8725    ESTABLISHED
tcp        0      0 ::ffff:192.168.10.31:22     ::ffff:192.168.10.2:8493    ESTABLISHED
udp        0      0 0.0.0.0:32768               0.0.0.0:*
udp        0      0 0.0.0.0:940                 0.0.0.0:*
udp        0      0 0.0.0.0:943                 0.0.0.0:*
udp        0      0 192.168.10.31:53            0.0.0.0:*
udp        0      0 127.0.0.1:53                0.0.0.0:*
udp        0      0 0.0.0.0:32839               0.0.0.0:*
udp        0      0 0.0.0.0:5353                0.0.0.0:*
udp        0      0 0.0.0.0:111                 0.0.0.0:*
udp        0      0 0.0.0.0:631                 0.0.0.0:*
udp        0      0 192.168.10.31:123           0.0.0.0:*
udp        0      0 127.0.0.1:123               0.0.0.0:*
udp        0      0 0.0.0.0:123                 0.0.0.0:*
udp        0      0 :::32769                    :::*
udp        0      0 :::32840                    :::*
udp        0      0 :::5353                     :::*
udp        0      0 fe80::202:b3ff:fe31:123     :::*
udp        0      0 ::1:123                     :::*
udp        0      0 :::123                      :::*
I try telnet and its work ...but now the error change ( :

Code:
C:\Documents and Settings\xp>nslookup
*** Can't find server name for address 192.168.10.31: Query refused
*** Default servers are not available
Default Server:  UnKnown
Address:  192.168.10.31

> set type=any
> mydomain.loc
Server:  UnKnown
Address:  192.168.10.31

*** UnKnown can't find mydomain.loc: Query refused
Thx all
 
Old 04-17-2008, 12:47 AM   #7
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
My head hurts, but please tell me where the entry for mydomain.loc is? Try a lookup on linux.mydomain.loc, I can see that one has an entry in the zone file.
 
Old 04-08-2011, 02:12 AM   #8
sunn8085
LQ Newbie
 
Registered: Mar 2011
Posts: 2

Rep: Reputation: 0
Dns query refused

hi,

My DNS in server is respoding well but if i look in windows client it is giving error same as the above post .Please help me out .

Thx
 
Old 04-08-2011, 04:19 AM   #9
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125

Rep: Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781
Welcome to Linux Questions.

I am glad that the LQ search engine was helpful to you in addressing your problem. While it may seem like a good idea to help provide background information, it would be best if you would please start a new thread instead of appending to one that is several years old. This allows us to better focus on helping you without being distracted by other, older, information. If you would like to point to the information in older posts, please include a link referencing them.

I would like to suggest that you use the report button on your post and ask a moderator to please move it to its own thread.
 
  


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
do i have to use Bind to configure DNS? nasirjones Linux - Newbie 18 07-29-2006 11:45 AM
how to configure bind with virtualhosts isuck@linux Linux - Networking 2 07-29-2006 11:44 AM
Configure bind in FC2 jgnasser Linux - Software 0 11-29-2004 11:30 PM
How can I configure BIND outside a subnet erik_wout_ew2 Linux - Networking 7 10-30-2004 12:29 PM
configure bind mblanco2000 Linux - Networking 1 04-27-2004 04:42 PM

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

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