The main router has a regular internet connection from the provider.
The second router is running OpenWRT and is connected to the first router via a cable (it receives internet from the first router).
The OpenWRT router is configured with a VPN WireGuard connection using the provider's official instructions:
The VPN is set up correctly:
– The IP changes to a VPN
– The traffic goes through the tunnel
– The WireGuard interface is active
The problem is as follows.
When checking through IP/DNS checkers (ipleak, dnsleaktest and analogues), it is seen that:
– IP – VPN
– DNS – provider of my country
– Geolocation of DNS corresponds to the real region, not VPN
Accordingly, there is a DNS leak: DNS requests do not go through WireGuard, but through the main router/provider.
What is already obvious:
– VPN works at the IP level
– DNS by default continues to resolve through upstream (first router or ISP)
– OpenWRT does not force DNS through the WG tunnel
Questions:
How to properly configure OpenWRT so that all DNS requests go to
Let's take a look at the config you've got running now -- this should hopefully reveal what is happening.
Please connect to your OpenWrt device using ssh and copy the output of the following commands and post it here using the "Preformatted text </> " button (red circle; this works best in the 'Markdown' composer view in the blue oval):
Remember to redact passwords, VPN keys, MAC addresses and any public IP addresses you may have:
ubus call system board
cat /etc/config/network
cat /etc/config/dhcp
cat /etc/config/firewall
I have exactly the same problem as the OP. The only way not to have a leak is by setting the wan interface up as static with Mullvad’s dns. What am I doing wrong?
I’m quite certain this wan setup is not included in Mullvad’s wireguard guide. Also this way when PBR is installed the router stops resolving addresses, so no opkg, no DDNS, etc. (the lan clients are fine though)
Edit:
“hijack”? Did I break forum etiquette or something?
hijacking a thread e.g. breaking into a thread with your own problem is something which is frowned upon.
We are happy to assist you but please make a thread of your own