OpenSUSE Linux Rants

OpenSUSE Linux Tips, tricks, how-tos, opinions, and news

My Resume  -  My LinkedIn Profile

October 16, 2009

[Linux] – Socks Proxy in One Command

by @ 3:54 pm. Filed under command-line, Linux tips, ssh tips

If you have difficulty browsing on your Linux workstation at work, say, because of filters and such, this will make your day. One other thing is that you need a Linux server that is outside your network at work. Once you have this, you can use ssh to create a socks proxy. Even as an un-privileged user, type in this command:

ssh -D 8080 <username>@<host>

Replace <username> with your username and <host> with your remote Linux server host name. Once that’s successful, pop open Firefox. Go to the EDIT Menu => Preferences. Select the ADVANCED button, then go to the “Network” tab. Click the “Settings” button. Select the “Manual Proxy Configuration” radio button. In the SOCKS Host, put in either the IP or the domain name of your remote Linux box. In the port, put in 8080, as that’s the one we used.

Click “OK” and close everything (except firefox). You should now be able to browse wherever your little heart desires.

One thing to note. NS queries are NOT proxied. So if your admins are looking at the name server lookup requests, you could still get nailed. Anyway, pretty neat little thing to know about ssh. Not sure that I’ve ever seen this capability on a Win32 platform. Yet another one of the many reasons that I really enjoy Linux.

Have a totally spectacular weekend.

4 Responses to “[Linux] – Socks Proxy in One Command”

  1. Cassiano Leal Says:

    It’s actually not very difficult to do in Windows via PuTTY.

    Linux’s method is a lot simpler, though. Not to mention that Linux itself is a much better platform for anything network related (IMO, for practically everything, but that’s my opinion).

    Didn’t know about the NS lookups limitation, though. That’s good to know, thanks!


  2. Scott Morris Says:

    Never tried it w/PuTTY. It’s just that it’s native to Linux. I agree that Linux is a better platform for practically everything. I do graphics and video editing on it, even. Great times. Thanks for stopping by!

  3. etescartz Says:

    Hi! I apologize in advance for my English (I’m not a native English speaker) but I’m in need of help on the subject of socks proxy.First of all, let me describe my dilemma. I work in a windows environment with no direct access to the internet.
    I happen to have SSH access to a linux server inside the company that does have internet access.At home I’m running linux ssh server and NX NoMachine server for remote desktop connections (I mention that the NoMachine NX server uses ssh authentication so if I have SSH access from anywhere on the internet i can also make secure remote desktop connections).The problem is that I don’t have privileged access, just basic user rights on the company’s linux server.
    Otherwise i would’ve just forwarded the connection with iptables or with a “Squid” proxy server.
    I’ve tried adapting the method described in this post by connecting to the linux server through putty but cannot figure out how to make it work. I tried tunneling the the my home computer’s custom SSH port through my SSH login on the company’s linux server, but that doesn’t seem to work, or I’m doing something wrong..
    Any help on thsi matter would be very much appreciated…

  4. Scott Morris Says:

    One thing I might suggest that may give you a little more control is to install cygwin. This would give you more Linux-native-like ssh client and server to work with.

OpenSUSE Linux Rants
Official OpenSUSE Linux Site

internal links:


SUSE Resources

search blog:


March 2022
« Feb    

60 queries. 0.361 seconds