Hi guys,
I have Wireguard tunnel set-up between two routers: one is my travel Beryl (running official firmware 4.3.19) and the other one is a Linksys, running OpenWRT. The subnets are:
Wireguard Beryl site: 192.168.20.0/24
Wireguard Linksys site: 192.168.1.0/24
This whole setup works perfectly fine, since I can access hosts from both sites towards both sites as if they were in the same LAN. On the OpenWRT site, that is done with routes towards the wireguard interface, as it would be done on any Linux. On the Beryl site though, this is done in a way that I can't really figure out, so the ip route
output is always the same before and after I switch on the Wireguard tunnel.
Now, I have this specific situation where I have an intermediate internet gateway (e.g. a public wifi) which I want to bridge through the Beryl, and that WiFi is using the same subnet as my Linksys router. So the routing path looks as follows:
Beryl (subnet 192.168.20.0/24) -> Intermediate Gateway (192.168.1.0/24) -> Linksys (192.168.1.0/24).
And the ip route
output of Beryl, with the Wireguard tunnel enabled, looks as follows:
default via 192.168.1.1 dev wlan-sta0 proto static src 192.168.1.3 metric 20
192.168.1.0/24 dev wlan-sta0 proto static scope link metric 20
192.168.20.0/24 dev br-lan proto kernel scope link src 192.168.20.1
In that situation, the whole Linksys (192.168.1.0/24) subnet is unreachable, although the internet is correctly routed through the Wireguard tunnel.
I know I could solve it with OpenWRT firmware on the Beryl and then using that version of Wireguard, but I want to use the official firmware.
Can someone guide me through the way routing works here, and what exactly am I missing?
Thank you in advance!