PBR sends all traffic through OpenVPN despite split setup

Hi all, thanks for any attention you can give to this.

I have searched the forum and solved a few problems already, so thank you people. My goal is to have split tunnelling with certain domains routed via a VPN and the rest just going normally via the ISP. I have tried with two VPN providers' OpenVPN setups, which seem identical really, and have the same issue. When I switch on the PBR service, all traffic is routed through the VPN. I have set the OpenVPN config in both attempts including

pull-filter ignore redirect-gateway
pull-filter ignore block-outside-dns

With PBR switched off, the router behaves as you would expect - the VPN tunnel is on and active, but no traffic is routed through it as it is not the default gateway. Logs show the OpenVPN service has successfully connected.
When I switch PBR on, in most cases, all traffic gets immediately routed via the VPN even though the default gateway checkmark is next to the normal wan interface details.

Can anyone help? Is PBR just not compatible with this setup? Or have I configured something wrong?

have you read https://openwrt.org/docs/guide-user/network/routing/pbr ?

WireGuard is easier and much faster so consider using WireGuard instead of OpenVPN

So if your VPN provider supports WireGuard consider using that and if your VPN provider does not support it change to a better VPN provider :wink:

How I setup WireGuard:
WireGuard Client Setup Guide

Policy Based Routing is possible with most VPN's so yes there probably is a configuration error, but without knowing what you use and what you have configured it is difficult to say for sure.

Thanks for the feedback guys. I resolved the issue

  1. Did sysupgrade to latest version of OpenWRT
  2. Used Wireguard and set route_allowed_ips = 0
  3. installed pbr in basic form (no dnsmasq-full) and followed the basic setup guide

I found it worked as expected in a way OpenVPN didn't. I am a happy camper now. Thanks again.