If you want to redirect your connection or pretend to appear from another host/location and have SSH account you can use SSH itself for that. Just run the following command:

ssh -D <address>:<port> <login_name>@<host_name>

For example:

ssh -D localhost:9999 username@example.com

This will create SOCKS proxy server on specified address and port. Then you can tell your applications to use that SOCKS server.

Optionally you can also disable command-line shell:

ssh -N -D localhost:9999 username@example.com

Or enable compression:

ssh -C -D localhost:9999 username@example.com

If your application does not support proxy settings you can use tsocks tool to transparent SOCKS proxify any application. Just configure tsocks:

Add following lines to /etc/tsocks.conf:

server =
server_port = 9999
server_type = 5

and run your program like this:

tsocks program <arguments>

For example:

tsocks program arg1 arg2

Leave a Reply

Close Menu