How do I configure networking to allow certain scripts/users to connect via different network interfaces?
I have a script on my Linode server which makes connections to external (non-Linode) servers. I need these connections to be made via a VPN or Proxy Service (to mask our IP address as well as rotate it periodically). At the same time, all other services on my server need to continue using the regular network interface and our normal public IP.
I signed up for a VPN service, but when I connect the VPN, it (obviously) routes all connections through the new network interface, thereby disconnecting my SSH connection, and blocking any incoming connections that are set up to use my public IP.
I'm guessing I need a way to tell the script to use a specific network interface? Or maybe run the script as a new user that is configured to connect to that interface? And it also seems like I need a way to prevent my VPN service from becoming the default interface when it connects.
I'm open to any suggestions. Thanks in advance for your wisdom and experience! :)