Struggling to Route Traffic Through VPN Gateway

I have OPNsense running on a mini PC with a Wireless AP connected to it. On the OPNsense, I am running a wireguard server to connect to while abroad so I can stream US shows. At the same time I am to setup two VPN tunnels to Germany and UK using Private Internet Access to stream shows that are limited to those localities. I have used this guide to setup the Wireguard Instances and use the OPNsense guide to finish setting up the NAT and Firewall rules. The traffic is not being channeled through the VPN. What am I doing wrong?

https://preview.redd.it/ltkdkmklcizc1.png?width=1415&format=png&auto=webp&s=7771335974c43e8cab02e5b621d365f4a7e19ce7

https://preview.redd.it/zr08zoklcizc1.png?width=1420&format=png&auto=webp&s=2a49fcdde73b5192b2f4f409c08e321fa39689dd

https://preview.redd.it/19h2yoklcizc1.png?width=1415&format=png&auto=webp&s=4d8813692be5c9b8333fc5f3ba215492bf80f886

https://preview.redd.it/ctcp7oklcizc1.png?width=1415&format=png&auto=webp&s=14dca4eff3b22845a9c046491d5542ea1c760c3e

https://preview.redd.it/f4n06oklcizc1.png?width=1415&format=png&auto=webp&s=604db27baa2990bbd6d7e0809f4b5269fa1c4aad

https://preview.redd.it/ovz6frklcizc1.png?width=1417&format=png&auto=webp&s=149346b41cd738519a22f656614825c2014d5c08

https://preview.redd.it/q6jpq8llcizc1.png?width=1418&format=png&auto=webp&s=abc4c3a43d7b3f3cdd5989846bbb73aac44a425f

https://preview.redd.it/xmpw8wklcizc1.jpg?width=1418&format=pjpg&auto=webp&s=78d5865fb5e8efaff5d80d7fbddb73dff0b189ad

Been a hot minute since I’ve done this, but don’t you want the floating rule to apply to inbound direction?

I’m on mobile so it’s a little hard to check the config via screenshots, but I believe you should tick the “Invert sense of the match” box for the LAN and Floating rules.

With your current LAN rule, it looks to me like you’re sending your RFC1918 traffic to PIA, but you probably want all but the RFC1918 to go there. With an exception for the WG tunnel traffic, ofc.

Part of the github repo is a python script that installs a cron that checks the connection every 5 minutes. There is an image of the VPN status page that shows it receiving and transmitting a few kb in traffic, which I assume is the cron script checking the connection.

That and the above hint to invert the match did it! Thank you

Thank you!!! That was it. Checking the destination invert sense of the match did it!

I’ve been running this setup for a long time and I’ve never had issues. What happens when you run the script to switch servers manually over SSH?

Glad to hear it! Enjoy :slight_smile: