Currently I create a ssh tunnel using: ssh user@server -D 1234 to use SOCKS proxy. How do I configure server so I can directly connect to socks server?

I want to set firefox socks host to server ip and port, instead of and the port specified with -D parameter.

  • 3
    The -D option of SSH makes the SSH server also act as a SOCKS server -- there is no other SOCKS server in the picture. What SOCKS server are you referring to then?
    – mgorven
    Commented May 13, 2012 at 5:23

3 Answers 3


You'll need to install and configure an actual SOCKS server on the server, such as Dante, SS5, Delegate or Srelay.


You can create a long-running SSH connection on the server to itself using ssh user@localhost -D You can create a script that verify if this command is running and put it on crontab to ensure if the connection fails for some reason it'll restart the job.


You could install something like Srelay, a free Socks proxy server software for Linux: http://socks-relay.sourceforge.net/

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .