Global Proxy in Ubuntu with SOCKS and ssh
May 11, 2009 1:53 PM   Subscribe

Global SOCKS5 Proxy in Ubuntu? (Or, MacOS/Widnows:Proxifier :: Linux:???)

I’m a recent Ubuntu adoptee, and have enjoyed solving the issues that come up in the switching as much as the OS itself, but this one seems to have me stymied. Basically, I’m looking for a way to set things up such that every single network connection goes through an SSL tunnel.

A basic bit of background: In either Mac OS or Windows, I’ve accomplished this exact thing by doing the following:

1. I have a remote server configured to be used as a SOCKS5 proxy.
2. I use the following command to direct all traffic sent to localhost:1080( on to my remote server:
ssh –ND 1080 –p 80

Where –N is used to show no confirmation after I enter the password, -D directs all traffic to 1080, and –p makes the ssh connection over port 80. (One of the few ports unblocked by my home ISP.)

3. Once that is connected, I use proxifier to direct all network traffic to localhost:1080.

This works perfectly for both setups. The thing I like best about it is that it directs *all* network traffic through Proxifier, and I can exempt things as needed. This is much, much simpler than configuring individual applications, and is invaluable for applications that don’t support SOCKS5 out of the box.

SO! The question: Does an alternative to proxifier exist for Linux? Some googling reveals that this same question has been asked, but in the rare instance that it’s been answered, the answerer didn’t seem to grok what proxifier did. The one thing that I’ve found, GSTM seems like it should do the trick, but I’ve yet to have any success.

Please note: While I will certainly entertain alternate methods to what I’m doing, they would need to follow two criteria:
1. I can do it without touching my remote server’s configuration. (Don’t want to mess up the already-working solutions I have for Windows/Mac.)
2. It must allow for stuff that doesn’t support SOCKS5 natively to run through a proxy.

Thanks in advance!
posted by SpiffyRob to Computers & Internet (4 answers total) 1 user marked this as a favorite
Do the ssh -d stuff in the same way, then:

System -> Preferences -> Network Proxy and then fill in the details. Fairly sure I haven't had to install anything from a standard Ubuntu setup to get that.
posted by gregjones at 2:44 PM on May 11, 2009

Best answer: For the stuff that doesn't natively support SOCKS proxying, you can run it through tsocks. There's an Ubuntu package for it.

There's a lower-level way to do it that affects all running apps called Kernel Socks Bouncer but it'll take quite a bit more fiddling to work since there isn't a ready-to-go Ubuntu package for it.
posted by zsazsa at 3:09 PM on May 11, 2009

stunnel ?
posted by zentrification at 5:12 PM on May 11, 2009

Response by poster: Thanks zsazsa, that did the trick.

For anyone finding this thread after the fact, here are a couple of tutorials explaining how to edit tsocks.config that I found helpful.

posted by SpiffyRob at 2:37 PM on May 13, 2009

« Older How large should the orifices on my BBQ be?   |   1-to-N, a single photo file to many pages Newer »
This thread is closed to new comments.