I often use an SSH tunnelling on my computer, using a SOCKS proxy.

ssh -D 1234 example.com

However, this only accepts local connections. I would like other systems on my network to be able to use the proxy on my computer as well.

How can I achieve this? If SSH doesn't have an option itself I imagine it might be possible to have a program proxy the proxy on a different port, but I don't know if there are any common tools to do this.


Tell it to bind to an external address instead of localhost.

ssh -D example.com
  • 13
    Or you can use ssh -D "*:1234" example.com to bind to all addresses. – Gordon Davisson Apr 30 '11 at 18:48
  • I found that last comment super useful! – jnthnclrk Mar 18 '13 at 18:08
  • 1
    I used as ip address. ssh -D example.com – Sahil Singh Dec 21 '14 at 18:08

You would have to enable routing on your host and set up a routing protocol, such as RIP. Basically, you have to act like a router and the other hosts have to have routing entries to get to the network on the other side (which is hopefully not a duplicate RFC1918 network).

  • The users just have to enter your proxy server's IP address... no routing required. – Mark E. Haase May 1 '11 at 1:36
  • @mehaase You are confused. And what will the proxy server do with it then? How will the users reach other networks? – Keith May 1 '11 at 1:42
  • Through the proxy? Isn't that the whole point? ssh -D acts as a SOCKS proxy, not just a point-to-point tunnel. It's application aware. – Mark E. Haase May 1 '11 at 1:51
  • Actually the question is confusing. I saw the tunneling, which is different from proxying. To share an IP tunnel is no different than routing through a point to point link. – Keith May 1 '11 at 4:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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