I’m at a loss and wanted to see if any Linux gurus on here can assist.
I’m following this tutorial…
https://www.pantz.org/software/openvpn/openvpn_with_private_internet_access_and_port_forwarding.html
…to segment a vpn client connection to a single interface on my Raspberry Pi so I can make specific programs utilize it while others communicate outside of the VPN.
This configuration worked flawlessly when I was on PIA but now that I moved to surfshark, it’s not.
Here’s what the client.conf should look like according to the tutorial…
Here’s my what client.conf looks like using surfshark…
Basically, I just added the last three lines to enable user scripting, pass the environmental variables to the route-up command, and execute openvpn-route.sh script.
This is the script that runs…
Also, according to the tutorial I need to run this command to create a table that the script references…
sudo bash -c 'echo "1 rt2" >> /etc/iproute2/rt_tables'
With all this in place, I run the script…
sudo openvpn --config /etc/openvpn/surfshark/surfshark.conf
The connection to the VPN is successful but I get the following error…
The script echoes “No env vars found.”
Is there something in my client.conf file that is preventing the env vars to be set or passed to the script?
Thank you in advance for the assistance!