WireGuard and adblock

I managed to finally set up WireGuard on my router (many thanks to the Turris people) but it seems that the adblock settings are not respected over the tunnel. I even have it pointed to the DNS server of the original subnet (which works for some reason). Any idea why it's not working?

ping @dibdot

If you run https://www.dnsleaktest.com/ on the other side of the tunnel, what DNS servers are being used? It should be using the same DNS server as the ones being used on the router. If not, you have a DNS leak which would explain the broken AdBlock.

You've setup the wireguard interface on your router as a "server" and want to use the local adblock enabled dns on connected wireguard clients?

Correct......

It shows the public DNS servers for my connection. They are correct both locally and through WireGuard (I'm using a phone connected to LTE)

OK, I'm using it exactly like that (with working adblock via wireguard). Here my slightly modified /etc/network on the router/server:

# wg server interface
#
config interface 'wg0'
	option proto 'wireguard'
	option private_key 'xxx'
	option listen_port '51820'
	list addresses '192.168.1.100/24'

# client 1
#
config wireguard_wg0
	option public_key 'xxx'
	option persistent_keepalive '25'
	list allowed_ips '192.168.1.10/32'
	option description 'mobile_db'

# client 2
#
config wireguard_wg0
	option public_key 'xxx'
	option persistent_keepalive '25'
	list allowed_ips '192.168.1.20/32'
	option description 'debian_vm'

[...]

config route
	option interface 'wg0'
	option target '192.168.1.0'
	option netmask '255.255.255.0'

On my android mobile I've only added the local/adblock enabled DNS server under "DNS servers" ... works for me.

Yep that works.

Had no idea about adding a static route. Much appreciated!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.