How to set system wide socks5 proxy in Gnome settings?

To use PBR, you need to identify the destination domains/IPs by capturing traffic with Wireshark or tcpdump, and then create routing rules to use a specific routing path for those destinations, e.g. like this to bypass the VPN:

sudo nmcli connection modify VPN_CONNECTION \
    +ipv4.routing-rules "priority 20000 table main to"
sudo nmcli connection up VPN_CONNECTION

I don’t use network namespaces, but here’s an example:
Routing & Network Namespaces - WireGuard

1 Like