I have a "dumb router" that has one network with WIFI (OpenWrt) connected to lan and lan is DHCP client with default routing to the DHCP assigned GW. Works perfectly, no issues.
In addition, I have two more networks (netCR and netUS) with their dedicated WIFIs that are to be routed via VPN (tunCGcr and tunCGus).
That works, as long as only either of the tunnels are up. Once the second tunnel comes up, routing stops for the clients in the other network. Both openvpn configurations have no "redirect-gateway def1".
I didn't want to spam my whole config here as I don't know which files would be of interest, but if someone's willing to look into it, I will provide whatever is required.
Without seeing your configs and logs just a long shot
Redirect gateway is often pushed by the server, so to be sure that that is not set, add to both openvpn configs:
pull-filter ignore "redirect-gateway"
Mind you then the tunnels might be up but nothing is routed via the tunnels as there is no default route via the tunnels, for routing you then have to use Policy Based Routing
You were right, routes are no longer pushed with this, however, now I'm stuck with pbr. It complains, it cannot initialze my tun interfaces.
root@Netgear-OWRT:~# service pbr start
Using uplink interface (on_start): lan [✓]
Found uplink gateway (on_start): 192.168.71.1 [✓]
Setting up routing for 'tunCR/tunCGcr/10.2.4.58' [✗]
Setting up routing for 'tunUS/tunCGus/10.36.4.241' [✗]
pbr.cfg066ff5.name=Plex/Emby Local Server validates as string with true
pbr.cfg066ff5.enabled=0 validates as bool with true
pbr.cfg066ff5.interface=wan validates as or("ignore", "tor", regex("xray_.*"), uci("network", "@interface")) with false
pbr.cfg066ff5.proto is unset and defaults to or(string) (null)
pbr.cfg066ff5.chain is unset and defaults to or("", "forward", "input", "output", "prerouting", "postrouting") prerouting
pbr.cfg066ff5.src_addr is unset and defaults to list(neg(or(host,network,macaddr,string))) (null)
pbr.cfg066ff5.src_port=8096 8920 32400 validates as list(neg(or(portrange,string))) with true
pbr.cfg066ff5.dest_addr is unset and defaults to list(neg(or(host,network,string))) (null)
pbr.cfg066ff5.dest_port is unset and defaults to list(neg(or(portrange,string))) (null)
pbr.cfg076ff5.name=Plex/Emby Remote Servers validates as string with true
pbr.cfg076ff5.enabled=0 validates as bool with true
pbr.cfg076ff5.interface=wan validates as or("ignore", "tor", regex("xray_.*"), uci("network", "@interface")) with false
pbr.cfg076ff5.proto is unset and defaults to or(string) (null)
pbr.cfg076ff5.chain is unset and defaults to or("", "forward", "input", "output", "prerouting", "postrouting") prerouting
pbr.cfg076ff5.src_addr is unset and defaults to list(neg(or(host,network,macaddr,string))) (null)
pbr.cfg076ff5.src_port is unset and defaults to list(neg(or(portrange,string))) (null)
pbr.cfg076ff5.dest_addr=plex.tv my.plexapp.com emby.media app.emby.media tv.emby.media validates as list(neg(or(host,network,string))) with true
pbr.cfg076ff5.dest_port is unset and defaults to list(neg(or(portrange,string))) (null)
Routing 'CR Routing' via tunCR [✓]
Routing 'US Routing' via tunUS [✓]
Installing fw4 nft file [✓]
Setting interface trigger for tunCR [✓]
Setting interface trigger for tunUS [✓]
pbr 1.1.8-r16 monitoring interfaces: tunCR tunUS
ERROR:
ip -4 route add default via 192.168.71.1 dev br-lan proto static src 192.168.71.38 table 256
ERROR: Failed to set up 'tunCR/tunCGcr/10.2.4.58'!
ERROR:
ip -4 route add default via 192.168.71.1 dev br-lan proto static src 192.168.71.38 table 257
ERROR: Failed to set up 'tunUS/tunCGus/10.36.4.241'!
ERROR: Failed to set up any gateway!
root@Netgear-OWRT:~#
Do you think, you can help me with that?
Regards
Robert
PBR is not made with a DumbAP in mind so no guarantee but it might help if we see your configs.
Please connect to your OpenWRT device using ssh and copy the output of the following commands and post it here using the "Preformatted text </> " button
Remember to redact keys, passwords, MAC addresses and any public IP addresses you may have:
ubus call system board
cat /etc/config/dhcp
cat /etc/config/firewall
ip route show
cat /etc/config/pbr
service pbr status
cat /var/run/pbr.nft
nft -c -f /var/run/pbr.nft
Reboot and test again, can you also show the output of:
cat /etc/config/network
Edit: it does not look that bad but I am missing your wan interface, you have set procd_wan_face as lan but I think it has to be the device so usually br-lan but for that I have to see your cat /etc/config/network
Okay, I will remove the destination addresses from the two routing entries and I will change the device from lan to br-lan. Here is cat /etc/config/network
root@Netgear-OWRT:~# cat /etc/config/network
config interface 'loopback'
option device 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'fde4:d575:7ef0::/48'
option packet_steering '1'
config device
option name 'br-lan'
option type 'bridge'
list ports 'lan1'
list ports 'lan2'
list ports 'lan3'
list ports 'lan4'
config interface 'lan'
option device 'br-lan'
option proto 'dhcp'
config device
option type 'bridge'
option name 'br-netUS'
option bridge_empty '1'
config interface 'netUS'
option proto 'static'
option device 'br-netUS'
option ipaddr '192.168.55.1'
option netmask '255.255.255.0'
config device
option type 'bridge'
option name 'br-netCR'
option bridge_empty '1'
config interface 'netCR'
option proto 'static'
option device 'br-netCR'
option ipaddr '192.168.43.1'
option netmask '255.255.255.0'
config interface 'tunCR'
option proto 'none'
option device 'tunCGcr'
config interface 'tunUS'
option proto 'none'
option device 'tunCGus'
root@Netgear-OWRT:~#
With pbr.config.procd_wan_interface set to br-lan, I get this:
root@Netgear-OWRT:~# service pbr restart
Resetting chains and sets [✓]
Removing routing for 'tunCR/tunCGcr/10.7.4.169' [✓]
Removing routing for 'tunUS/tunCGus/10.27.4.233' [✓]
pbr 1.1.8-r16 (fw4 nft file mode) stopped [✓]
Using uplink interface (on_start): br-lan [✓]
Setting interface trigger for tunCR [✓]
Setting interface trigger for tunUS [✓]
ERROR: The br-lan interface not found, you need to set the 'pbr.config.procd_wan_interface' option!
ERROR: Refer to https://docs.openwrt.melmac.net/pbr/#procd_wan_interface.
root@Netgear-OWRT:~#
I'm giving up on this. I started a new config with Travelmate and that seem to allow a working version of this.
Please do not invest any more time into this.