Wireguard, how to route all traffic via one of peers

Hi. I have 2 LANs with openwrt routers, they connected via wireguard server with static ip in AWS.

  • Bounce server in AWS. wireguard interface ip 10.10.10.10, allowedips for LAN#1 192.168.1.0/24 and .2 for LAN2
  • LAN #1 - 192.168.1.1/24, has wireguard ip 10.10.10.1, peer allowedips = 10.10.10.0/24, 192.168.2.0/24
  • LAN #2 - 192.168.2.1/24, has wireguard ip 10.10.10.2, peer allowedips = 10.10.10.0/24, 192.168.1.0/24

Zones in each router: LAN and WG. forward allowed between them.
So, two networks connected. i can ping hosts in net 1 from hosts in net 2.

What i need to do is to route all the traffic in LAN1 to go to LAN2 WAN gateway (192.168.2.1), so in LAN1 i can browse internet like i'm in LAN2.

Not sure how can i do it. Thanks

In R1 you need to add allowed IPs for peer 0.0.0.0/0, that will send all traffic to the tunnel.
The same on AWS server with peering to R2, however you should not add the route.
On R2 make sure WG zone can forward to WAN.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.