Vpn between two lan

I have two openwrt routers A and B. I need router B to route all trafic except for 10.0.0.0/8 to router A (including the traffic from computers and phones connected to router B, which also passes through router A because router B has no external network connection). I tried to directly treat B as a client and A as a server, but this doesn't work, The default gateway of B does indeed point to A, but cannot ping A. (OpenVPN and Wireguard have both tried and failed, but if I use my computer as a client to connect to A, both VPNs work)

How would these two devices connect, then? Are they directly connected to each other?

A diagram of your network might make this easier to understand -- a photo of a sketch on paper is sufficient.

I also tried site to site, this works, but the default route of B and clients connected to B is still B's wan route, not route to A

You don't need a VPN. Router B simply needs either static routes or policy based routing.

sorry, this picture conflits, router A is in lan 10.2.0.0/16, router B is in lan 10.1.0.0/16

A VPN still is not the method to be used here. Standard routing should do the trick.

how to route accross lans

Static routes or policy based routing.

I have solved this, router B using client configuration, interface tun firewall region change from wan to none, since doing this, I could connect to outside network in router B; Add static route to router B, so devices connected to router B can access ourside network using vpn connection between A and B.

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