DNS issues after connecting two networks with openvpn in routing mode


I have two networks - “home” and “office”. office hosts an openvpn server to which home is connected. I can connect from home to every device connected to office and from office devices to home devices as well.

At the office, I have a few devices which have a dynamic DNS record from DHCP, ending with “.office” (printer.office, camera.office, etc).

I want to maintain the list of DNS records at home, belonging to home, and same for office. However, for every DNS record ending with “.office”, I want home to redirect the request to the DNS server at office. I tried to create some DNS rules with kresd but for some reason, the kresd at the office will never reply back when receiving requests from home.

I’m not sure how to open kresd to answer to IPs from outside of its subnet (obviously it listens I want the home’s kresd to forward requests that end with a specific TLD (so home’s kresd should only forward *.office requests to office’s kresd).

Yes, normally it listens on wildcard addresses, so assuming you tested this correctly, I can only think of firewall blocking it. I’d test e.g. by dig @serverAddress turris.cz +tcp (with TCP the ability to “connect” is better reported).

When this is resolved, the second step should be relatively easy (for me at least).