1
Virtual private networks / wireguard client not passing through local DNS resolver
« on: December 11, 2022, 01:15:36 am »
Hello,
I have OPNsense installed on a local server in the LAN, with a wireguard vpn service (like torguard) and wireguard server (road warrior setup with which I can connect to LAN remotely and pass remote connection through VPN provider tunnel).
All works well with one exception - when connecting to wireguard server from a remote location, I can access LAN and web, and when accessing the web, it passes through torguard VPN server but uses its own DNS server rather than the DNS server provided by OPNsense or the torguard server. Using unbound and adguard, the remote client doesn't even pass through them.
For the sake of example, OPNsense is 192.168.2.1. The wireguard client is an android device and is setup as 10.10.0.11 and to go through a tunnel address of 10.10.0.1/24; allowed IPs on endpoint 10.10.0.0/24. Interface static IP 10.10.0.1, and gateway IP 10.10.0.1
If I change the DNS in both android and VPN->wireguard->local->advanced mode->DNS server from blank or 10.10.0.1 to 192.168.2.1, adguard sees and filters the wireguard client but DNS isn't resolved. Tried to switch adguard off and Sensei instead of adguard. No difference
Thanks
I have OPNsense installed on a local server in the LAN, with a wireguard vpn service (like torguard) and wireguard server (road warrior setup with which I can connect to LAN remotely and pass remote connection through VPN provider tunnel).
All works well with one exception - when connecting to wireguard server from a remote location, I can access LAN and web, and when accessing the web, it passes through torguard VPN server but uses its own DNS server rather than the DNS server provided by OPNsense or the torguard server. Using unbound and adguard, the remote client doesn't even pass through them.
For the sake of example, OPNsense is 192.168.2.1. The wireguard client is an android device and is setup as 10.10.0.11 and to go through a tunnel address of 10.10.0.1/24; allowed IPs on endpoint 10.10.0.0/24. Interface static IP 10.10.0.1, and gateway IP 10.10.0.1
If I change the DNS in both android and VPN->wireguard->local->advanced mode->DNS server from blank or 10.10.0.1 to 192.168.2.1, adguard sees and filters the wireguard client but DNS isn't resolved. Tried to switch adguard off and Sensei instead of adguard. No difference
Thanks