Record the public IPv4 address, public IPv6 address and DNS path from a wired client before switching it to WireGuard. Back up /etc/config/network, /etc/config/firewall and /etc/config/dhcp. Keep a wired management port on the original network. Ask the VPN provider for the server public key, endpoint, assigned tunnel address and supported IP versions.
Add a WireGuard peer and select the test subnet's exit
In LuCI, open Network → Interfaces and add a WireGuard VPN interface. Enter the local private key and tunnel address. In Peers, enter the server public key, host and port. Set the peer’s Allowed IPs to 0.0.0.0/0 for a full IPv4 tunnel. Add ::/0 only if the VPN supports full-tunnel IPv6. To test one subnet, leave Route Allowed IPs off and use policy routing to send just that subnet through WireGuard. The router still needs to reach the server endpoint over its regular WAN.
In LuCI, open Network → Firewall and create a dedicated zone for WireGuard. Allow the test subnet to forward to that zone. If the server has no return route for the test subnet, a commercial VPN normally requires IPv4 masquerading on the tunnel zone. Configure IPv6 using the provider’s address and prefix guidance. If the VPN cannot carry IPv6, decide whether the test subnet may use IPv6 directly or should have IPv6 forwarding blocked.
Testing a client's tunnel exit point and local access
Set up an echo service that can verify the source. First, have a wired test device access through the original WAN. Then, switch to WireGuard and retest with a new session, and capture the bytes received by the peer.
Have the test device initiate a new connection. Use wg show to verify handshake and byte counts, then from the client check IPv4 and IPv6 exit addresses and DNS resolution. The public IP should match the expected VPN exit. Access the local NAS to confirm the local LAN remains accessible. Keep the WAN online and disable the tunnel for retesting, verifying the device follows the pre-defined policy to either drop the connection or go direct. Gradually expand the test scope.
Redirect outbound to remote endpoint while preserving LAN resources to expand scope. If the switch fails, first verify endpoint routing and tunnel NAT configuration, then restore the original LAN gateway.
Check the terminal output

Lab record

GeeksMeta's two-site OpenWrt 25.12.6 VM test. Both LAN clients reached the remote HTTP service over IPv4 and IPv6. Removing A's IPv4 route to B stopped IPv4 HTTP while the handshake and IPv6 access persisted. IPv4 returned when the route was restored. The screenshot shows site A's live LuCI interface list.
Comments