Domain Dependant DNS

Michael B Allen mba2000 at ioplex.com
Fri Jan 30 08:37:52 UTC 2004


On Wed, 28 Jan 2004 14:04:31 -0500, Kevin Darcy wrote:
>>So the question is; can I configure the name server on my LAN to use
>>different forwarders depending on the domain of the name being queried?
>>Or is there something I can do local to the machine doing the VPN?
>>
> You could set up a BIND nameserver on your LAN that forwards by default
> to your Internet ISP and then uses "per-domain" forwarding or stub zones
> for all of the domains associated with your workplace (don't forget the
> reverse zones too!). E.g.
> 
> zone "example.com" {
>     type forward;
>     forwarders { x.x.x.x; y.y.y.y; };
>     forward only;
> };

I actually found this decribed in the named.conf man page and I indeed
run bind on my lan but I quickly realized it would ultimately create a
problem becuase I would not want it to be effective all of the time. I
would only want to use those forwarders while I was connected by VPN. When
I am not connected I would like the domain to be serviced by the Internet
name servers.

It sounds like there just isn't a really decent solution for dynamic DNS
for temporarily split networks. That will require a totally different
approach. Actually what might work is to use LD_PRELOAD to augment the
name service libraries to look for an environment variable that specifies
and alternate resolv.conf. That way you can just export that and launch
all applications from there or log in as a different user using Xnest etc.

Mike


More information about the bind-users mailing list