[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

DNS for two small networks connected by openvpn tunnel



Hi group,

I have two small networks each running dnsmasq for dhcp and dns. One is
at my place, the other at my parents'. These networks are connected
through an openvpn tunnel and I like to make them operate like a single
network. A solution would be to run only one dnsmasq to server both
networks, but I want everything to be functional even if the tunnel goes
down (for example, adsl or cable company problems). So I tried to tell
both dnsmasq servers they are serving the domain ileos.home. Works for
each network, but not across the tunnel. For example, if I do a host
lookup for 'elim', it searches for elim.ileos.home, and _my_ dnsmasq
tells me that host does not exist, even though the _other_ dnsmasq would
know it is up and running. So I tried including this in dnsmasq.conf:

server=/ileos.home/10.0.10.1

For clarification: I told each dnsmasq that the server serving
ileos.home is the _other_ dnsmasq. This works somewhat, because host
'betelgeuse' returns the address of my laptop on my network, and host
'elim' returns the address of my brother's pc at my parents'. So,
dnsmasq first tries its own dhcp leases database and then tries the
upstream server. The problem with this setup is that if I lookup
www.google.nl, it first tries www.google.nl.ileos.home (because of
search ileos.home in /etc/resolv.conf) and that results in a 5-second
timeout. After that, it returns the correct address. Visiting a site
like slashdot with references to different sites for pictures etc. or
visiting www.nosnieuws.nl which redirects you two www.nos.nl/nieuws
seems to take an awfully lot of time. So this is not it.

Right now, I named one network alpha.ileos.home and the other
beta.ileos.home and I changed the server= lines accordingly. Everything
works fine, except that I now can't lookup 'elim'. I have to lookup
'elim.alpha.ileos.home' because my own domain is beta.ileos.home so that
is in the search list in my resolv.conf. I want my dhcp server to tell
my laptop to search both domains. Apparently, dhcp option 119 from rfc
3397 does exactly this, but the warning that my dhcp client will
probably not support this seems correct. I rather not want to set up all
clients to ignore the dhcp server supplied search list (only the local
domain) and insert both domains manually.

Is there a Debian way of connecting both networks dns-wise and allowing
all clients to lookup each other's hostnames without domain parts?

Thanks in advance and sorry for the long story,

David



Reply to: