how do I get a single DNS to return addresses based on query source address

phn at phn at
Tue Jun 18 05:15:02 UTC 2002

Yossie Silverman <yossie at> wrote:

> The problem:

> I would like to have a single DNS server (bind) running on my 
> network.  This server should return an internal (non global) address 
> when the source address of the query is internal as well.  Otherwise, 
> it should return the external (global) address.  From what I can tell 
> from the docs, sortlist (in options) SHOULD be able to do this, but 
> it isn't clear exactly how to get it to do so.

> E.g.

> Internal network:

> If a query comes from this network, for 'mail', the resolved address 
> should be  If it comes from outside this network, the 
> resolved address should be (all addresses are 
> "fictitious").

The easiest way is to use bind-9 and make use of the 'view' statement
and two zonefiles, one with ip's from your internal net and the other
with external ip's.

> Thanks! - Yossie

Peter Håkanson         
        IPSec  Sverige      ( At Gothenburg Riverside )
           Sorry about my e-mail address, but i'm trying to keep spam out,
	   remove "icke-reklam" if you feel for mailing me. Thanx.

More information about the bind-users mailing list