AW: different external and internal addresses

Walkenhorst, Benjamin Benjamin.Walkenhorst at telekom.de
Tue Nov 9 07:29:00 UTC 2004


Hello,

> I want to have different ip addresses for a lookup based on where the 
> query comes from.  For example www.tupari.net should be 
> 66.166.198.124 
> to the outside world but 192.168.0.2 to the internal one.  While the 
> bind admin guide shows how to restrict certain zones based on 
> ip, that 
> isn't what I want to do.  So how do I do this while running one bind?

You can use views, they are explained in the BIND v9 ARM.
You can match views depending on the source-IP of a query as well the
destination-IP. Within a view, you can override global options by re-defining
them. For example, you could answer recursive queries from your internal view
but refuse them from the external view.
If you want to have queries answered differently from both views, you need
to set up two sets of zone files. 
A sample config might look something like this:

view "internal" {
	match-destinations { 192.168.0.2; };
	
	[ ... your options and zones go here ... ]
};

view "external" {
	match-destinations { 66.166.198.124; };
	
	[ ... ]
};

For further details on views, see the BIND v9 ARM (it should come with BIND9),
if you are willing to throw money at it, see Liu's & Albitz' "DNS & BIND",
available from O'Reilly. 

Kind regards,
Benjamin



More information about the bind-users mailing list