Use second OpenWrt DNS over Wireguard

Hi! I've connected my two routers/subnets together with wireguard. Everything works nicely however I want to share the hostname entries I already created on the second router with the first one.

Network:

  • Home1 subnet 192.168.0.1/24, wireguard interface 10.80.0.1 (+some peers)
  • Home2 subnet 192.168.1.1/24, wireguard 10.80.1.1 (+some peers)
    (I want Home2 dns records to be usable by Home1)

Issues:

  • I tried adding 192.168.1.1 to dhcp options on Home1 but the dns on Home2 did not respond to requests because of the Local service only option (which I would like to keep)

  • I tried moving all wg peers across routers to the same subnet 10.80.1.1 so that the dns requests are recognised. This time I edited the wan interface and added 8.8.8.8 and 192.168.1.1 which resulted in router Home2 being connection-dead. After many restarts I narrowed the problem to peer Home1 defined in wg. After clearing same caches and reseting dnsmasq I managed to recover the router.

What I am doing wrong and how can I implement this? The alternative which is not by far perfect is to copy all hostname assignments to the other router.

You can set up a different domain suffix for the remote LAN and use selective DNS forwarding.

1 Like

Thank you for the solution. Setting this up I saw that there are two entries where the DNS can be configured:

  • DHCP & DNS > General Settings > DNS forwardings
  • Advanced Settings > Additional servers files

I would like to know what is the difference between the two?