Skip to content
Contents
GuidesOpenWrt

Verify both LANs can reach each other over site-to-site WireGuard on OpenWrt

First, configure A and B to use non-overlapping subnets. For example, A uses 192.168.21.0/24 and B uses 192.168.22.0/24.

First, configure A and B to use non-overlapping subnets. For example, A uses 192.168.21.0/24 and B uses 192.168.22.0/24. The tunnel addresses are 10.220.0.1/30 and 10.220.0.2/30 respectively. The outer WAN is reachable first, and the inner subnets are handed off via WireGuard. Broadcast services across sites require a separate discovery proxy.

Fill each side with the other side's prefix

On A's peer, enter B's public key, the remote reachable address, 10.220.0.2/32 and 192.168.22.0/24. On B's side, enter A's corresponding address. Enable Route Allowed IPs in OpenWrt to create routes based on AllowedIPs. Allow WAN to specify the WireGuard UDP port. Assign a separate network zone to the tunnel, and allow LAN-to-tunnel and reverse traffic based on business needs. Each router serves as the default gateway for its own side.

Verify connectivity and return path from LAN hosts on both sides

The address ranges on both sides must not overlap. First, verify the handshake and AllowedIPs at the router level. Then, use a real terminal on each side to request services from the opposite side and observe the response.

A station client accesses the controlled HTTP service of B station, while B station performs reverse testing. The handshake succeeds but the business fails. Check whether the target subnet is correctly assigned to the proper peer, whether kernel routing is installed, whether it matches fw4 and the return path. Remove one experimental route, rerun, then restore and verify. Keep each station's own local management interface intact.

Should be able to verify correct source subnet and reverse routing. When a handshake passes but business traffic fails, compare firewall forwarding rules with the destination default gateway.

Check both routers' overlay addresses and their responses in both directions. · OpenWrt 25.12.6 x86/64 (QEMU/KVM).
Check the terminal output
Check both routers' overlay addresses and their responses in both directions. · OpenWrt 25.12.6 x86/64 (QEMU/KVM).
Check both routers' overlay addresses and their responses in both directions. · OpenWrt 25.12.6 x86/64 (QEMU/KVM). Open the original image

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.

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.

Reference

Related guides

Reference

Check the model, region and hardware revision on the label before selecting firmware.

Explore hardware

Comments