From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Samuel Subject: Re: DNS for internal end external Date: Thu, 03 Jul 2003 08:35:49 -0700 Sender: linux-admin-owner@vger.kernel.org Message-ID: <3F044D55.70005@bcgreen.com> References: <1057127539.3675.13.camel@krishna.softprosys.com> <20030702012114.K62470@unixfoo.netlojix.net> <1057145402.3675.33.camel@krishna.softprosys.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1057145402.3675.33.camel@krishna.softprosys.com> List-Id: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: murali.potla@softprosys.com Cc: Jessie Bryan , "linux-admin@vger.kernel.org" It looks like the views would do what's wanted, but you will have to have two files... one for internal one for external. If what you want to do is avoid having two files for machines which have the same address for both external and internal, then you can actually have three files: One file is for unique internal addresses one file is for unique external addresses One file is for machines which have the same address {ex,in}ternally. The third file would be included from inside each of the first two. If what you actually want is to have one file with addresses for both internal and external, then you'll have to put together a filter... For this, I'm thinking of something like: # hostname internal external www A 192.168.45.11 37.45.222.11 ftp A 192.168.45.51 37.45.222.51 mail MX`1 intmail extmail mail MX 3 . remote.mx.com. intservice A 192.168.45.51 / A quick perl or aqk script would do a good job of Tturning this into two separate files. (left as an exercise for the reader... or you can pay me to do it..:-) intonly.me.com 192.168.53.31 . A quick awk or perl script would go from this to a real zone file. Murali Potla wrote: > On Wed, 2003-07-02 at 13:56, Jessie Bryan wrote: > 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 ? -- Stephen Samuel +1(604)876-0426 samuel@bcgreen.com http://www.bcgreen.com/~samuel/ Powerful committed communication. Transformation touching the jewel within each person and bring it to life.