[clug] Two networks, separate DNS: Fake Root?

Daniel Pittman daniel at rimspace.net
Wed May 19 18:41:54 MDT 2010


Alex Satrapa <grail at goldweb.com.au> writes:

> Just a quickie: I have two networks to connect to - one is a desktop lab
> consisting of an OpenWRT hosting its own DNS, with a bunch of lab equipment
> that I want to talk to, the other is the network I share with other computers
> and it's through this that I get to the Internet.
>
> In this environment, it would be nice if "host www.example.com" would resolve
> "real world" addresses, while "host equipmentX.lan" would resolve desktop lab
> addresses.
>
> Routing is already taken care of with a pretty simple routing table, but the
> DNS library only wants to talk to one host for DNS requests.
>
> Is there a way I can manipulate the DNS tables (I'm using dnsmasq at the
> moment) to fake a root server which says "for the '.lan' TLD, talk to that
> server, for everything else ask the normal server"?

dnsmasq will respond with anything in /etc/hosts out of the box, has a bunch
of command line options to populate the resolver responses, and IIRC will
also serve up anything that gives it a hostname field via DHCP in some zone or
other.

So, read the manual page?  Otherwise, grab bind or something and this is
pretty much standard: just serve the zone as master, on the recursive resolver
the clients use, and it will respond from the local data.

        Daniel
-- 
✣ Daniel Pittman            ✉ daniel at rimspace.net            ☎ +61 401 155 707
               ♽ made with 100 percent post-consumer electrons


More information about the linux mailing list