Resolving an internal IP address for a domain from an external DNS server?

Kaya Saman SamanKaya at netscape.net
Thu Jan 7 17:27:48 UTC 2010


Hi guys,

I hope this is possible to do and someone can help me doing it!

Basically I have an authoritative DNS server located at IP 81.178.2.118 
running on Solaris 9 with 3 views; one for internal clients, one for my 
current location (which has a static IP address as I'm running an 
internet test radio station from it), and one for external clients 
(everyone not in "my" network).

What I would like to do is use this server located at 81.178.2.118 to 
resolve a local IP address to my radio server??

I mean I have FreeBSD and Bind running on the radio server but only want 
to use it for hinted root zone queries as being authoritative means that 
I will need to get the zone from the 'main' DNS server then my view will 
be redundant.

Currently I have this setup on the remote machine:

in /etc/opt/csw/bind/optiplex-networks-kiziltoprak file:

zone "optiplex-networks.com" {
   type master;
   file "/var/named/optiplex-networks-kiziltoprak.db";
   allow-query { 212.156.209.87; };
};


This is the view for it:

view "kiziltoprak" {
    match-clients { 212.156.209.87; };
    allow-recursion {
                127.0.0.1;
                212.156.209.87;
                };

        zone "." {
                type hint;
                file "/etc/opt/csw/bind/db.root";
        };

        include "/etc/opt/csw/bind/named.conf.kiziltoprak";

};

And zone file:

;
; BIND data file for example.com
;
$TTL    1d
@       IN      SOA     ns1.optiplex-networks.com.  
mail.optiplex-networks.com. (
                            2010010704         ; Serial
                                  7200         ; Refresh
                                   120         ; Retry
                               2419200         ; Expire
                                 86400)        ; Default TTL
;
                                        IN      NS      
ns1.optiplex-networks.com.
[...]
ns1.optiplex-networks.com.              IN      A       81.178.2.118
[...]
rd1.optiplex-networks.com.              IN      A       192.168.1.100
ns1.rd1.optiplex-networks.com.          IN      A       192.168.1.100
[...]


If I run a dig query from my linux notebook having 81.178.2.118 as the 
nameserver in /etc/resolv.conf I get this:

> root at Hp-Compaq-2230s:/var/log# dig @ns1.optiplex-networks.com 
> optiplex-networks.com
>
> ; <<>> DiG 9.5.1-P2.1 <<>> @ns1.optiplex-networks.com 
> optiplex-networks.com
> ; (1 server found)
> ;; global options:  printcmd
> ;; Got answer:
> ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 16423
> ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1
>
> ;; QUESTION SECTION:
> ;optiplex-networks.com.        IN    A
>
> ;; ANSWER SECTION:
> optiplex-networks.com.    86400    IN    A    81.178.2.118
>
> ;; AUTHORITY SECTION:
> optiplex-networks.com.    86400    IN    NS    ns1.optiplex-networks.com.
>
> ;; ADDITIONAL SECTION:
> ns1.optiplex-networks.com. 86400 IN    A    81.178.2.118
>
> ;; Query time: 80 msec
> ;; SERVER: 81.178.2.118#53(81.178.2.118)
> ;; WHEN: Thu Jan  7 19:20:28 2010
> ;; MSG SIZE  rcvd: 89

Which is fine as recursion is enabled so no probs there!

Now if I try the local IP domain I get this:

> root at Hp-Compaq-2230s:/var/log# dig @ns1.optiplex-networks.com 
> rd1.optiplex-networks.com
>
> ; <<>> DiG 9.5.1-P2.1 <<>> @ns1.optiplex-networks.com 
> rd1.optiplex-networks.com
> ; (1 server found)
> ;; global options:  printcmd
> ;; connection timed out; no servers could be reached

This I don't understand!


I have enabled logging on the main server and the response from 
query.log is this:

07-Jan-2010 19:22:16.581 queries: info: client 212.156.209.87#36722: 
view kiziltoprak: query: ns1.optiplex-networks.com IN A +
07-Jan-2010 19:22:16.670 queries: info: client 212.156.209.87#57993: 
view kiziltoprak: query: rd1.optiplex-networks.com IN A +
07-Jan-2010 19:22:21.669 queries: info: client 212.156.209.87#57993: 
view kiziltoprak: query: rd1.optiplex-networks.com IN A +
07-Jan-2010 19:22:26.669 queries: info: client 212.156.209.87#57993: 
view kiziltoprak: query: rd1.optiplex-networks.com IN A +

Something's working but not working properly.....??

Can anyone give me a clue as to why I can't see the private IP address: 
192.168.1.100 which is what the server is supposed to resolve?

I am on Bind 9.6.0-P1


Many thanks and best regards,

Kaya






More information about the bind-users mailing list