OpenWrt Forum Archive

Topic: What's the correct way to set up DNS for two networks connected by VPN

The content of this topic has been archived on 11 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I have to network in different subnets connected by a VPN.  There are routes from one network to the other.

What's the right way to set up DNS so I can resolve names for all machines in the network?

Should I put each network in a subdomain (foo.lan and bar.lan), give one the top level .lan, the other foo.lan, or leave both in .lan, and set up the dns (s for server) to send unfulfilled requests to another server?


The "correct" answer should work if another network and vpn tunnel are added (2 client VPNs, 1 server).

Can dnsmasq handle this, or do I need to switch to something like bind?

Hi.

Any news? I am also interested.

I have added following lines to /etc/dnsmasq.conf:

domain=domain.local
server=/domain.local/192.168.1.9
server=/1.168.192.in-addr.arpa/192.168.1.9

Computers behind VPN client can resolve names behind VPN server. But can dnsmasq register its clients to external DNS (192.168.1.9) in order to computers behind VPN server could resolve VPN clients names?

--
Booboo

The discussion might have continued from here.