From mboxrd@z Thu Jan 1 00:00:00 1970 From: Murali Potla Subject: Re: DNS for internal end external Date: 02 Jul 2003 17:00:02 +0530 Sender: linux-admin-owner@vger.kernel.org Message-ID: <1057145402.3675.33.camel@krishna.softprosys.com> References: <1057127539.3675.13.camel@krishna.softprosys.com> <20030702012114.K62470@unixfoo.netlojix.net> Reply-To: murali.potla@softprosys.com Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20030702012114.K62470@unixfoo.netlojix.net> List-Id: Content-Type: text/plain; charset="us-ascii" To: Murali Potla , Jessie Bryan Cc: "linux-admin@vger.kernel.org" On Wed, 2003-07-02 at 13:56, Jessie Bryan wrote: > On Tue, 2 Jul 2003, Murali Potla wrote: > > > > > Hi, > > > > How do i configure bind so that when a request comes from our LAN, > > address should be resolved to local address and when the request is from > > outside it should resolve it to a public address. > > We do this in Bind 9 using "views" > In the below example the "LAN" are clients that belong to 192.168.0/24 > and the "outside" is everything else. > > example: > > view "internal" { > match-clients { 192.168.0/24; }; > recursion yes; > zone "domain.com" { > type master; > file "domain.com-internal"; > }; > > }; > > view "external" { > match-clients { 0.0.0.0/0; }; > recursion yes; > zone "domain.com" { > type master; > file "domain.com-external"; > }; > }; > > HTH > This is ok. How can i use the same zone file for both internal and external clients ? Because here i need to maintain two files. lets say for a domain.com i will have a zone file which will have both internal and external addresses. But when a query comes for abc.domain.com, it should be resolved to 192.168.1.10 if the request is from 192.168.1.5 and when a query comes for abc.domain.com from a public IP it should be resolved to the publicly addressable IP of abc.domain.com (lets say 100.100.110.101). Is this setup possible with bind ? Thanks Murali