Hello all,
I have two OpenWrt One routers running OpenWrt version 24.10. I have successfully established an OpenVPN tunnel between the two via the WAN. Now I want to route between the subnets that the two routers are connected to.
The routers' LAN addresses are x.y.73.1 and x.y.74.1 and their LAN subnets are x.y.73.0/24 and x.y.74.0/24 respectively. The tunnel addresses are x.y.75.1 and x.y.75.2 at the two routers' ends. I've created an interface in the LuCi menu Network -> Interfaces -> Add New Interface named OpenVPN, Unmanaged, Device = tun0. I've then added that interface to the lan firewall zone. I can successfully ping each tunnel endpoint over the tunnel. The two routers are the default gateway for their two subnets.
Now I have two problems with the routing:
- I can't define a static route over the tunnel. On router x.y.74.1, in the LuCi menu Network -> Routing -> Add, I add a route Interface=OpenVPN, unicast, Target=x.y.73.0/24, Gateway=Unspecified. I Save and Save and Apply. But the route doesn't get created in the system routing table. I ssh to the router and type the command "route" - there is no route to x.y.73.0 defined.
- After manually creating the route, I can ping from the router to addresses on the other subnet, but other devices on the source router's subnet can't ping them. It's as if the router is not acting as a gateway to the tunnel. On router x.y.74.1, I type the command "route add -net x.y.73.0/24 tun0". Then, on router x.y.74.1 I can successfully ping x.y.73.123. But from x.y.74.234, I can't ping x.y.73.123.
Any assistance would be much appreciated. Thanks in advance.
Graham