Visit Our UNIX and Linux User Community


Split DNS not working with Bind-9.7

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Split DNS not working with Bind-9.7
# 1  
Old 05-11-2012
Split DNS not working with Bind-9.7

Hi All,

Distros of machines : RHEL6
Bind Vesrion : Bind-9.7-3.2

I am trying to set up a test DNS for my home network. I have two rhel 6 machines A and B. Machine A has 2 NICs and is acting as a router also, one NIC is facing intranet and the otehr is facing intranet. On machine A i have configured the DNS server on the internal interface and i am forwarding all the queries from DNS server to another DNS. It works fine when i try to do any name lookup from machine A.

Now there is a machine B which has a private IP configured. From this machine i try to ping the machine A's internal interface IP on which DNS is configured, ping works fine, then i try doing a telnet on the same IP on port 53 and that also works fine. However when i use this internal DNS to do lookup on machine B it never works. I get an error saying

connection timed out, no server could be reached.

Internal IP of machine A : 192.168.30.1
External IP of machine A : 20.198.226.121
IP of machine B : 192.168.30.3

I am pasting my named.conf file
Code:
/*
 Sample named.conf BIND DNS server 'named' configuration file
 for the Red Hat BIND distribution.

 See the BIND Administrator's Reference Manual (ARM) for details, in:
   file:///usr/share/doc/bind-{version}/arm/Bv9ARM.html
 Also see the BIND Configuration GUI : /usr/bin/system-config-bind and
 its manual.
*/

options
{
        // Put files that named is allowed to write in the data/ directory:
        directory               "/var/named";           // "Working" directory
        dump-file               "data/cache_dump.db";
        statistics-file         "data/named_stats.txt";
        memstatistics-file      "data/named_mem_stats.txt";


        /*
          Specify listenning interfaces. You can use list of addresses (';' is
          delimiter) or keywords "any"/"none"
        */
        //listen-on port 53     { any; };
        listen-on port 53       { 127.0.0.1; 192.168.30.1; };

        allow-query             { localhost; };

        // Enable/disable recursion - recursion yes/no;
        recursion yes;
};

logging
{
/*      If you want to enable debugging, eg. using the 'rndc trace' command,
 *      named will try to write the 'named.run' file in the $directory (/var/named).
 *      By default, SELinux policy does not allow named to modify the /var/named directory,
 *      so put the default debug log file in data/ :
 */
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};

/*
 Views let a name server answer a DNS query differently depending on who is asking.

 By default, if named.conf contains no "view" clauses, all zones are in the
 "default" view, which matches all clients.

 Views are processed sequentially. The first match is used so the last view should
 match "any" - it's fallback and the most restricted view.

 If named.conf contains any "view" clause, then all zones MUST be in a view.
*/

#view "localhost_resolver"
#{
/* This view sets up named to be a localhost resolver ( caching only nameserver ).
 * If all you want is a caching-only nameserver, then you need only define this view:
 */
#       match-clients           { localhost; };
#       recursion yes;

        # all views must contain the root hints zone:
#       zone "." IN {
#               type hint;
#               file "/var/named/named.ca";
#       };

        /* these are zones that contain definitions for all the localhost
         * names and addresses, as recommended in RFC1912 - these names should
         * not leak to the other nameservers:
         */
#       include "/etc/named.rfc1912.zones";
#};
view "internal"
{
/* This view will contain zones you want to serve only to "internal" clients
   that connect via your directly attached LAN interfaces - "localnets" .
 */
        match-clients           { 192.168.30.0/24; };
        recursion yes;
        forwarders { 20.198.16.155;};
        zone "." IN {
                type hint;
                file "/var/named/named.ca";
        };

        /* these are zones that contain definitions for all the localhost
         * names and addresses, as recommended in RFC1912 - these names should
         * not leak to the other nameservers:
         */
        include "/etc/named.rfc1912.zones";

        // These are your "authoritative" internal zones, and would probably
        // also be included in the "localhost_resolver" view above :

        /*
          NOTE for dynamic DNS zones and secondary zones:

          DO NOT USE SAME FILES IN MULTIPLE VIEWS!

          If you are using views and DDNS/secondary zones it is strongly
          recommended to read FAQ on ISC site (www.isc.org), section
          "Configuration and Setup Questions", questions
          "How do I share a dynamic zone between multiple views?" and
          "How can I make a server a slave for both an internal and an external
           view at the same time?"
        */

#       zone "my.internal.zone" {
#               type master;
#               file "my.internal.zone.db";
#       };
#       zone "my.slave.internal.zone" {
#               type slave;
#               file "slaves/my.slave.internal.zone.db";
#               masters { /* put master nameserver IPs here */ 127.0.0.1; } ;
                // put slave zones in the slaves/ directory so named can update them
#       };
#       zone "my.ddns.internal.zone" {
#               type master;
#               allow-update { key ddns_key; };
#               file "dynamic/my.ddns.internal.zone.db";
                // put dynamically updateable zones in the slaves/ directory so named can update them
#       };
};

#key ddns_key
#{
#       algorithm hmac-md5;
#       secret "use /usr/sbin/dnssec-keygen to generate TSIG keys";
#};

#view "external"
#{
/* This view will contain zones you want to serve only to "external" clients
 * that have addresses that are not match any above view:
 */
#       match-clients           { any; };

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

#       recursion no;
        // you'd probably want to deny recursion to external clients, so you don't
        // end up providing free DNS service to all takers

        // These are your "authoritative" external zones, and would probably
        // contain entries for just your web and mail servers:

#       zone "my.external.zone" {
#               type master;
#               file "my.external.zone.db";
#       };
#};

/* Trusted keys

  This statement contains DNSSEC keys. If you want DNSSEC aware resolver you
  have to configure at least one trusted key.

  Note that no key written below is valid. Especially root key because root zone
  is not signed yet.
*/
/*
trusted-keys {
// Root Key
"." 257 3 3 "BNY4wrWM1nCfJ+CXd0rVXyYmobt7sEEfK3clRbGaTwSJxrGkxJWoZu6I7PzJu/
             E9gx4UC1zGAHlXKdE4zYIpRhaBKnvcC2U9mZhkdUpd1Vso/HAdjNe8LmMlnzY3
             zy2Xy4klWOADTPzSv9eamj8V18PHGjBLaVtYvk/ln5ZApjYghf+6fElrmLkdaz
             MQ2OCnACR817DF4BBa7UR/beDHyp5iWTXWSi6XmoJLbG9Scqc7l70KDqlvXR3M
             /lUUVRbkeg1IPJSidmK3ZyCllh4XSKbje/45SKucHgnwU5jefMtq66gKodQj+M
             iA21AfUVe7u99WzTLzY3qlxDhxYQQ20FQ97S+LKUTpQcq27R7AT3/V5hRQxScI
             Nqwcz4jYqZD2fQdgxbcDTClU0CRBdiieyLMNzXG3";

// Key for forward zone
example.com. 257 3 5 "AwEAAaxPMcR2x0HbQV4WeZB6oEDX+r0QM65KbhTjrW1ZaARmPhEZZe
                      3Y9ifgEuq7vZ/zGZUdEGNWy+JZzus0lUptwgjGwhUS1558Hb4JKUbb
                      OTcM8pwXlj0EiX3oDFVmjHO444gLkBO UKUf/mC7HvfwYH/Be22GnC
                      lrinKJp1Og4ywzO9WglMk7jbfW33gUKvirTHr25GL7STQUzBb5Usxt
                      8lgnyTUHs1t3JwCY5hKZ6CqFxmAVZP20igTixin/1LcrgX/KMEGd/b
                      iuvF4qJCyduieHukuY3H4XMAcR+xia2 nIUPvm/oyWR8BW/hWdzOvn
                      SCThlHf3xiYleDbt/o1OTQ09A0=";

// Key for reverse zone.
2.0.192.IN-ADDRPA.NET. 257 3 5 "AQOnS4xn/IgOUpBPJ3bogzwcxOdNax071L18QqZnQQQA
                                VVr+iLhGTnNGp3HoWQLUIzKrJVZ3zggy3WwNT6kZo6c0
                                tszYqbtvchmgQC8CzKojM/W16i6MG/ea fGU3siaOdS0
                                yOI6BgPsw+YZdzlYMaIJGf4M4dyoKIhzdZyQ2bYQrjyQ
                                4LB0lC7aOnsMyYKHHYeRv PxjIQXmdqgOJGq+vsevG06
                                zW+1xgYJh9rCIfnm1GX/KMgxLPG2vXTD/RnLX+D3T3UL
                                7HJYHJhAZD5L59VvjSPsZJHeDCUyWYrvPZesZDIRvhDD
                                52SKvbheeTJUm6EhkzytNN2SN96QRk8j/iI8ib";
};
*/

Also logging is also not working properly. I am not getting any useful information in the logs, if you could explain about that too, it would be great.
Please let me know if you would need any information to diagnose the issue better.

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Bind (DNS) error on EL 6.4

Gurus I have configured bind 9 on Red hat EL 6.4, it can resolve from hostname i.e from domain name (like cnn.com, bbc.com)but through IP its shows following error. Need your expert opinion to solve it. error 84.23.97.31 Server: 192.168.31.24 Address: 192.168.31.24#53 ** server can't... (1 Reply)
Discussion started by: smazshah
1 Replies

2. Solaris

DNS Bind Upgradation in Solaris 10

Hi All , My current Bind version is BIND 9.6.1 and I want upgrade the same to BIND 9.8.1-P1 ,Can any one provide the steps to do the same ? Solaris Version : 5.10 Generic_144488-11 sun4v sparc Thanks , (0 Replies)
Discussion started by: sandeep.tk
0 Replies

3. Red Hat

Public dns bind 9

Hi Friends, I need help to understand how to publish my public dns to internet. I have configured bind 9 on thel5 server and it working fine. My question is, as i donot want to expose my orginal hostname to outside and my zone files are configured with the NS recorde of the orginal hostname,... (5 Replies)
Discussion started by: arumon
5 Replies

4. UNIX for Advanced & Expert Users

DNS server choice: Windows DNS vs Linux BIND

I'd like to get some opnions on choosing DNS server: Windows DNS vs Linux BIND comparrsion: 1) managment, easy of use 2) Security 3) features 4) peformance 5) ?? I personally prefer Windows DNS server for management, it supports GUI and command line. But I am not sure about security... (2 Replies)
Discussion started by: honglus
2 Replies

5. UNIX for Advanced & Expert Users

DNS Bind

Hello, I have a question about dns file zone. Every zone file begins like: @ 86400 IN SOA ns1.website.com. admin@website.com. ( It means that name server ns1 is responsible for this zone. At the ending I can add the records like mysite.com IN A 1.2.3.4 So it will... (2 Replies)
Discussion started by: mirusnet
2 Replies

6. Solaris

solaris - BIND / DNS

hi all forgive my ignorance, but when IVe set up DNS Ive put in the various server details in the /etc/resolv.conf and away I go. Suddenly Ive been reading about DNS, and I need to created a /etc/named.conf file. so, my question is this. DNS, what part does the /etc/resolv.conf play in... (3 Replies)
Discussion started by: sbk1972
3 Replies

7. UNIX for Dummies Questions & Answers

Dns/bind

Hi, Does anyone know anything about DNS/BIND? I need to tell my dns for every sub-domain foward on to my main domain.... so *.example.com gets sent to exmaple.com. Any ideas. I've looked at bind on my machine and theres about 10 files....i just don't know where to put the rule or exactly... (2 Replies)
Discussion started by: elduderino
2 Replies

8. IP Networking

Question on DNS/BIND

I have set up a BIND server running on Redhat AS 3.0 and the question I have is that I can point my laptop to that server and resolve all the hosts I have put in my .zone file but for the life of me I can resolve any outside information. I have verified the server can talk to the world. Any hints... (2 Replies)
Discussion started by: Acleoma
2 Replies

9. UNIX for Dummies Questions & Answers

BIND DNS replication

I have a RedHat 7.1 box that we use for DNS in our System Engineering lab. We have a Windows 2000 box that handles DNS in our main office. The Microsoft Admin and I have been given the task of making both of our domains accessible to each other. I had originally made his domain my forwarder, so... (5 Replies)
Discussion started by: Jody
5 Replies

10. UNIX for Dummies Questions & Answers

DNS/BIND question, is it ze germans?

First some back ground info: I am working on a computer running SuSE 7.3 I am still trying to set up a DNS I downloaded BIND 9.2.1 and was following a tutorial about BIND. It said at virtually the start of the tutorial that I should find a file called named.conf in my /etc directory. Yes, I... (1 Reply)
Discussion started by: ignus7
1 Replies

Featured Tech Videos