Local SOCKS5 server connected to VPN?

[removed]

Posted Feb 12, 2023, 3:46 AM UTC

09
aioeu•

If you're not dead set on OpenVPN specifically, how about the SOCKS proxy support built into OpenSSH?

2
flightfromfancyOP•

Trying to wrap my head around this- is the idea to create a new virtual network interface with a socks5 server attached, and then configure that new interface to use my VPN config?

1
aioeu•

No, nothing like that at all.

If you do:

ssh -D 8080 -N user@host

then you'll have a SOCKS proxy running on port 8080 at the local end that tunnels everything over the SSH connection to the remote end.

Might just be a whole lot simpler than trying to set this up with OpenVPN.

3
flightfromfancyOP•

The issue is the VPN is the main point, I want my local socks5 server to connect to a Big Name VPN provider.

An alternative that might be easier is that my apps allow me to specify anl network interface, so if I just create a new tun0 that is not the default route (like what happens if I connect via network-manager gui) I can just specify that interface in the apps I want and the rest of my desktop uses my default interface. Trying to figure out the commands now...

1
aioeu•

Well, in that case the first 8 words of my first comment are significant: you are dead set on OpenVPN.

2
AutoModeratorMOD•

This submission has been removed due to receiving too many reports from users. The mods have been notified and will re-approve if this removal was inappropriate, or leave it removed.

This is most likely because:

  • Your post belongs in r/linuxquestions or r/linux4noobs
  • Your post belongs in r/linuxmemes
  • Your post is considered "fluff" - things like a Tux plushie or old Linux CDs are an example and, while they may be popular vote wise, they are not considered on topic
  • Your post is otherwise deemed not appropriate for the subreddit

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1
dotNomedia•

That's the setup I use in my router!
I'm using srelay (installed via opkg). You can specify an outbout interface with -J option.
In my case the full command looks like srelay -c /opt/etc/srelay.conf -r -s -J tun11 -i :1080

1
flightfromfancyOP•

Thanks for the package tip! Now that I have it figured out how to create a non gateway tun interface to my VPN, I can use srelay for any programs that support SOCKS5.

1