Connect to remote server using following ssh command:
> ssh -D 12345 remote-server.com
a sock5 server will started on localhost:12345, port is 12345.
install tsocks package, as sock5 client
> sudo apt-get install tsocks
edit /etc/tsocks.conf
> vi /etc/tsocks.conf
remove everything, and enter following lines:
server = 127.0.0.1
server_type = 5
server_port = 12345
> ssh -D 12345 remote-server.com
a sock5 server will started on localhost:12345, port is 12345.
install tsocks package, as sock5 client
> sudo apt-get install tsocks
edit /etc/tsocks.conf
> vi /etc/tsocks.conf
remove everything, and enter following lines:
server = 127.0.0.1
server_type = 5
server_port = 12345
save and quit
Now to run firefox (or any other network application), using sock5, execute following command:
> tsocks firefox
enjoy, secure, quick and easy sock5 proxy over ssh.