bind config to view local virtual servers

news user news at sisyphus.news.be.easynet.net
Fri Jul 2 23:13:12 UTC 2004


On Fri, 02 Jul 2004 16:55:22 -0400, Barry Margolin wrote:

> In article <cc4d4e$ac5$1 at sf1.isc.org>,
>  news user <news at sisyphus.news.be.easynet.net> wrote:
> 
>> On Fri, 02 Jul 2004 14:21:04 -0400, Barry Margolin wrote:
>> 
>> > You're going to have to give us more information.  What's different 
>> > about the ways that www.mydomain.com and ed.mydomain.com are entered 
>> > into your DNS?  What happens when you try to access ed.mydomain.com?
>> 
>> links http://www.mydomain.com	OK
>> links http://mybox		OK
>> links http://internalip		OK
>> 
>> I think the problem is for ed.mydomain.com it will make a request to
>> external DNS and try and come back into my domain rather than pointing
>> streight to my DMZ.
>> 
>> links http://ed.mydomain.com	FAIL (host not found)
>> 
>> I think I need to be working with "views" (found the article ;) but I can
>> figure it out... this is a sample of my "not working" config:
>> 
>> view "internal"{
>>         match-clients { localnets; };
>>         zone "mydomain.com" IN {
>>                 type master;
>>                 file "db.mydomain";
>>                 allow-update { none; };
>>         };
>> };
>> 
>> Any clue?
> 
> If db.mydomain has identical records for "www" and "ed", they should 
> both work.  You never answered my first question: what's different about 
> the ways that the two hostnames are entered into the zone file?  Perhaps 
> you should post db.mydomain.

The test from my LAN would be:
www.mydomain.com	OK
mail.mydomain.com	FAIL

what I have:

# cat /etc/named.conf
options {
        directory "/var/named";
        // query-source address * port 53;
        listen-on {
                127.0.0.1/32;
                172.20.1.1/32;
                172.20.100.1/32;
                172.20.100.2/32;
        };
};
 
//
// a caching only nameserver config
//
zone "mydomain.com" IN {
        type master;
        file "db.mydomain";
        allow-update { none; };
};
 
zone "." IN {
        type hint;
#       file "named.ca";
        file "named.root";
};
 
zone "localhost" IN {
        type master;
        file "localhost.zone";
        allow-update { none; };
};
 
zone "0.0.127.in-addr.arpa" IN {
        type master;
        file "db.127.0.0";
        allow-update { none; };
};
 
zone "1.20.172.in-addr.arpa" IN {
        type master;
        file "db.172.20.1";
        allow-update { none; };
};
 
zone "100.20.172.in-addr.arpa" IN {
        type master;
        file "db.172.20.100";
        allow-update { none; };
};
 
 
# cat /var/named/db.mydomain
$TTL    86400
; $ORIGIN localhost.
; @                       1D IN SOA       @ root (
 
mydomain.com. IN SOA mybox.mydomain.com. ed.mydomain.com. (
                                        42              ; serial (d. adams)
                                        3H              ; refresh
                                        15M             ; retry
                                        1W              ; expiry
                                        1D )            ; minimum
  
;                        1D IN NS        @
;                        1D IN A         127.0.0.1
 
mydomain.com.                   IN NS           arrakis.mydomain.com.
 
localhost.mydomain.com.         IN A            127.0.0.1
boxindmz.mydomain.com.           IN A            172.20.100.2
pc-4928.mydomain.com.           IN A            172.20.1.10
 
arrakis.mydomain.com.           IN A            172.20.1.1
arrakis.mydomain.com.           IN A            172.20.100.1
 
fwl.mydomain.com.          IN A            172.20.1.1             ; Arrakis Local
fwd.mydomain.com.          IN A            172.20.100.1           ; Arakis DMZ
ns.mydomain.com.                IN CNAME        fw.mydomain.com.	; Name server
 
www.mydomain.com.               IN CNAME        caladan.mydomain.com.   
mail.mydomain.com.              IN CNAME        caladan.mydomain.com # cat


I really think I need to use "view" but I can't figure out how it's
suposed to work.

Any errors in the files, feel free to comment.

Many thx 4 ur time :)
Ed.


More information about the bind-users mailing list