Travelrouter PBR doesn't work on WWAN

I've been busy with setting up my travelrouter with different wg tunnels and ssid's etc to bring along trips. When pluging it in to the router it will get the internet trough the wan port, then having an wwan interface for when the WAN will drop (or to use it as a wifi bridge from the local wifi or mobile hotspot)

The strangest thing is when the cable connection drops when it was active, or when i disable the wan interface, my wwan takes over (which is set as a wifi client) and continues to provider internet and keeps my wireguard tunnels alive.

When rebooting it without the WAN enabled or have an active connection on the WAN, my pbr doesn't work, and there is no listing of default gateways available. So all my internet trough it is not routed as I want. (which breaks the purpose of the travelrouter :P)

Is there a way to provide PBR with the correct settings to switch to WWAN as main gatewat, or having the WAN interface include the wanport and wificlient. So that when wifi is on and no cabled connection it still checks it as the wan interface?

Doesn't have to be superclean, usually i plug it in cabled or using it as wifi client from the start (depending on options i have at the location)

With the official software this worked, but I wanted to full options of OpenWRT.

Upgrade to the latest pbr version from upstream and add your wwan interface to the list of supported interfaces. There's no automatic failover from wan to wwan in policies tho.

I tried it before and just did it again, but same results.

When my WAN is enabled and device booted, it shows in PBR the all the available gateways: wan,wwan, wg1, wg2,wg3 etc and the check is placed at the WAN interface as it should.

But when I disable my wan interface or disconnect the cable and reboot the device, my wifi works connected as a client for the wwan and the others as accesspoints, so it bridges my connection as it should. But again at PBR the list of gateways is gone, and my routes don't work so all also my different SSIDs are getting the local ip instead the ones from the wireguard.

I've read somewhere that a WWAN acts differently so I will need to search a bit more. And I will re-install the official ROM to check any info, because with that software it works as they advertise it should, and there is a openwrt settingspage included.

Which pbr version have you tried?

I got it resolved after some searching and testing the last period, reading that the later verions of PBR don't check for other wan gateways.

In the following file: /etc/config/pbr
I needed to add the options:

option procd_wan_ignore_status '1'
and/or
option procd_wan_interface 'wwan'

Problem was PBR was waiting for the wan interface to be started, which wouldn't happen if it wasn't plugged in or disabled. That's why pbr was working after it already had started and then the cable would have been unplugged, but not from a restart or reboot.

Now i'm able to have my router back in to wan/wwan and keep my routes active :slight_smile:

1 Like

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