Is it possible using custom DNS whilst VPN Policy Based on the Target Domain or IP is configured?
Ideally I want my DNS for non VPN Policy traffic to be from Cloudflare and for VPN Policy DNS traffic to go over the VPN provider.
However when I set DNS to manual mode and specify Cloudflare all my DNS queries end up getting routed abroad, so if I do a DNS leak test online I get back results for Cloudflare in the country my VPN is connected to.
Edit: just occurred to me that I can set the DNS in the DHCP, any concerns with this?
Edit 2: had some weirdness where all traffic started to go out via VPN, inbound connections were affected by this too. Rebooted and toggled the VPN client off and it seems to have solved it for now. But I can't ping my wan from an external source and get a response unless I turn the wire guard client.
Edit 3: lol seems ddns updated to use the VPN address
I just factory reset the router, that dynamic dns thing I mentioned above wasn't the issue. The router doesn't seem to allow inbound ICMP when the VPN client is enabled, but I'm sure it was working fine when I first got the Flint 2 and had tested the Wireguard client.
Anyway let's look at this behaviour now, I've configured it as specified with PBR but for some reason all traffic was going out of the VPN. I then adjusted the domain in the PBR and that seems to have fixed things and I'm no longer seeing the VPN use all of the traffic.
But I have seen this behaviour on and off when testing the Wireguard Client VPN.
Any suggestions? Also would like to know if there is anything I can do to fix the inbound ICMP issue.
Edit: just reset the router again (flash 4.5.8. firmware and choose to erase settings), didn't touch anything with DNS and just setup the VPN again but it's using VPN DNS for everything
No traffic for PBR domains go through VPN but DNS leak test show VPN DNS servers
A minute or so later the traffic starts to go through VPN for the domains in PBR but DNS leak still shows queries coming back from VPN DNS
Perform the exact same configuration on beta 4.6.0 and the VPN works correctly from the get go as defined with the PBR rules, DNS leak tests show the ISPs DNS which is correct
edit: I see the spelling mistake above for that domain so I should retest on 4.5.8, I copied that from the 4.6.0 config which was working fine till I changed the LAN subnet to 192.168.1.0/24 at which point everything started going through the VPN, presumably because of a spelling mistake?
Anyway retesting on 4.5.8. and I'll copy paste the domains to ensure no error.
Edit 2: Retested on 4.5.8 with the correct spelling. VPN PBR routing is working, the correct domains are going through VPN however getting the shenangians with the DNS leak again.
Retesting on 4.6.0 and I took the same steps but didn't change the LAN and everything works fine.
Let me change the LAN to 192.168.1.0/24 and see if that causes any issues
Edit 3: changed the LAN to 192.168.1.0/24 and all works fine, VPN PBR Routing works as well as DNS leak tests show ISP DNS.
So it appears then that the 4.5.8 firmware has a bug with PBR routing.
I am on 4.6.0 and did a lot of test. Everything is correct.
The only problem is that you need to flush the dns cache.
Need to do this on both Windows and reopen the browser.
Maybe wait a while and reopen the browser.
The IP and DNS seems always be cached for a while, no matter what I do.
Thanks. I haven't changed anything since I sent that message, I went to the bathroom and came back. But everything is going over the VPN again.
I've done a traceroute to 104.21.92.106 which is A host for ifconfig.io and it's going over the VPN. Same on my phone, I guess DNS can't be the problem here because I'm using the IP now. 2nd hop is the VPN DNS server.
tracert 104.21.92.106
Tracing route to 104.21.92.106 over a maximum of 30 hops
1 <1 ms <1 ms <1 ms console.gl-inet.com [192.168.8.1]
2 44 ms 45 ms 44 ms 10.2.0.1
3 44 ms 44 ms 44 ms m95-153-31-113.cust.tele2.ee [95.153.31.113]
4 45 ms 44 ms 45 ms static-212-107-37-113.cust.tele2.ee [212.107.37.113]
5 79 ms 79 ms 79 ms fra36-core-1.bundle-ether8.tele2.net [130.244.39.206]
6 * * * Request timed out.
7 78 ms 78 ms 78 ms 162.158.108.2
8 79 ms 79 ms 79 ms 104.21.92.106
Perhaps something is afoul with /etc/wireguard/scripts/wgclient-route-update.sh ?
ip route list
default via 188.240.160.83 dev pppoe-wan proto static metric 10
188.240.160.83 dev pppoe-wan proto kernel scope link src WAN_IP
192.168.8.0/24 dev br-lan proto kernel scope link src 192.168.8.1
I can't view the default route tables
ip route show table default
Dump terminated
I did a ip route flush cache too but that didn't help
Edit: looks like there is no default route table, other name of prelocal instead
ip route show table prelocal
Dump terminated
ip route show table local
local 10.2.0.2 dev wgclient proto kernel scope host src 10.2.0.2
local WAN_IP dev pppoe-wan proto kernel scope host src WAN_IP
broadcast 127.0.0.0 dev lo proto kernel scope link src 127.0.0.1
local 127.0.0.0/8 dev lo proto kernel scope host src 127.0.0.1
local 127.0.0.1 dev lo proto kernel scope host src 127.0.0.1
broadcast 127.255.255.255 dev lo proto kernel scope link src 127.0.0.1
broadcast 192.168.8.0 dev br-lan proto kernel scope link src 192.168.8.1
local 192.168.8.1 dev br-lan proto kernel scope host src 192.168.8.1
broadcast 192.168.8.255 dev br-lan proto kernel scope link src 192.168.8.1
ip route show table main
default via 188.240.160.83 dev pppoe-wan proto static metric 10
188.240.160.83 dev pppoe-wan proto kernel scope link src WAN_IP
192.168.8.0/24 dev br-lan proto kernel scope link src 192.168.8.1
Edit: my theory is something is resetting the routing table during normal operation, hence why VPN initially works
Edit: since adding/removing domains and toggling VPN client off everything seems to work for now
Traceroute won't work because the DNS request will tell the router to modify the routing table.
Since your traceroute isn't by DNS, it won't show the correct way.