Adbock on router, wont block ads when VPN is used

Hi all,

I got OWRT and adblock. When connected to the router ads are blocked.
When connect to OpenVPN or Wireguard vpn, ads are not blocked. Which might be the right behaviour as the raffic is routed thhrough the tunnel.
Question is what can be done so that ads are blocked on the router while VPN is connected?
Any ideas?

The usual adblock works because dnsmasq on the router is used which has lists of advertising domains which are blocked.

Have you been " tampering" with dns settings e.g: using option6?

2 Likes

Please clarify: Did you set up OpenVPN or Wireguard on your router or on the device you're now see ads?

1 Like

OWRT router has OPVN and WG clients. All clients connect to the router and one of the VPNs.
On all clients I can still see ads if using VPN on the router. If not, ads are gone.

@egc , are you sayng ads must be gone, even in the above setup? I havent made any changes to anything.

Every client which uses the router as DNS server should profit from adblock.

3 Likes

Why are you running vpn clients behind OpenWRT?
Use pbr to pass the needed traffic only using any of your vpn tunnels already connected by your Openwrt.

1 Like

All clients use vpn from the router, not vpn on the client.
Only router is connected to VPN.
I am still not clear how can I use adblock on the router when von is on.

I'd say this should work. If it doesn't, we'll need way more information about your actual setup. I'm assuming you somehow force all client traffic through your VPN instead of only this traffic that should be routed. My first instinct would be you're running some kind of "DNS leak" setup that on purpose completely avoids your local DNS.

So please quote us the full network, firewall, DNS and VPN configuration you run.

1 Like

Because the clients shoud be configured to use the router's DNS (i.e. Adblock).

1 Like