I have set up Stubby which seems to work.
But when I try with ipleak.com or dnsleaktest.com
I see both DNS from ISP provider and VPN provider.
DNS forward is set: 127.0.0.1#5453 and 0::1#5453
and "Ignore resolv file" is checked.
echo "network.wan.peerdns=$(uci get network.wan.peerdns)"
echo "network.wan.dns=$(uci get network.wan.dns)"
echo "network.wan6.peerdns=$(uci get network.wan6.peerdns)"
echo "network.wan6.dns=$(uci get network.wan6.dns)"
echo
echo "dhcp.@dnsmasq[0].dnssec=$(uci get dhcp.@dnsmasq[0].dnssec)"
echo "dhcp.@dnsmasq[0].dnsseccheckunsigned=$(uci get dhcp.@dnsmasq[0].dnsseccheckunsigned)"
echo "dhcp.@dnsmasq[0].noresolv=$(uci get dhcp.@dnsmasq[0].noresolv)"
echo "dhcp.@dnsmasq[0].localuse=$(uci get dhcp.@dnsmasq[0].localuse)"
echo "dhcp.@dnsmasq[0].server=$(uci get dhcp.@dnsmasq[0].server)"
I don't use my VPN provider's DNS and settled for Cloudfare's DNS over TLS (DoT).
I doubt its the reason for your issue but nevertheless fix the IPv6 listen address please.
IPv6 localhost is ::1, yes yes even the leading zero will probably (or hopefully) not hurt. But you never know how some programs parses the input .
I have tested and not seems to working.
I use this:
Name: Intercept-DNS
Restrict to address family: IPv4 and IPv6
Protocol: TCP, UDP
Source zone: lan
External port: 53
Destination zone: unspecified
Internal IP address: any
Internal port: any
I get "DNS over TLS" dns to my vpn and wireguard.
I want vpn and wireguard for vpn-provider goes in tunnel
and all LAN through "DNS over TLS" tunnel.
I'm also using PBR
If you only have a few devices you want to use the VPN DNS for, this firewall Port Forward redirect may help.
e.g. 1x device, using the source MAC address to use VPN DNS, all other devices using Cloudfare DOT.
You can add more devices using the same rule through the GUI.
config redirect
option dest 'lan'
option target 'DNAT'
option src 'lan'
option src_dport '53'
option name 'Intercept-DNS-PIA'
option dest_ip '10.0.0.243'
list src_mac '94:XX:XX:XX:XX:XX'
I'm not sure if this does what is says? Override preconfigured DNS provider for LAN clients. Prevent DNS leaks for LAN clients when using VPN or DNS encryption.
Name: Intercept-DNS
Restrict to address family: IPv4 and IPv6
Protocol: TCP, UDP
Source zone: lan
External port: 53
Destination zone: unspecified
Internal IP address: any
Internal port: any
Thanks for your answer.
I have tested what you suggested and I can't get it to work.
All tests get both dns, from vpn-dns and DOT dns servers.
Tested both Intercept-DNS and Intercept-DNS-PIA config with same result.
I'm using EGC's script to get pushed dns from vpn-provider and for wireguard have dns set in "Use custom DNS servers"
The goal is to get dns from vpn-provider only uses by vpn and wireguard.
DNS from the internet provider only used by wan clients to wan .
ISP DNS is only used by wan clients to wan via DOT.