Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to tunnel all the traffic in my machine , now I do this :

ssh -D 1080 

Then , change Mac OS SOCKS proxy to localhost:1080 ,

But is it possible to tunnel the traffic without SOCKS5 ?

Extra Info:

I'm trying to use just SSH commands , so it should work with most of operating systems , since I cannot configure SOCKS5 correctly in Ubuntu , so I hate it.

share|improve this question
what about SOCKS4? – Lucas Kauffman May 7 '12 at 17:26
@LucasKauffman it does not matter , what I'm trying to do is using just a simple command (e.g. ssh commands) , so I use the same syntax over any Operating Systems. – Abdullah May 7 '12 at 17:39
What about OpenVPN? There is no magic way to tunnel traffic. But you can build a simple VPN with OpenVPN and then add some routes to redirect the traffic. – diegows May 7 '12 at 20:26
@diegows thanks , but I don't know much about OpenVPN ? I think I have to read about it , even if it seems a little bit difficult. – Abdullah May 13 '12 at 7:26

You can use SSH to tunnel specific local ports to specific remote ports, but it will not have the flexibility of using the -D (socks) option. To forward a single port do this:

ssh -L

Then any connection made to port 1080 on the machine running ssh will be forwarded to port 80 on But that's it. You can't surf the Web this way, but you can when you use the -D (socks) option.

Also, you can specify multiple -L localport:remotehost:remoteport options to a single ssh command.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.