Simple SOCKS proxy
Create a simple SOCKS proxy with SSH by using the -D flag:
ssh -D 2400 username@some.host.com
That command will open up a SOCKS proxy on your workstation on port 2400. If you configure your application to use the local SOCKS proxy, any traffic using the proxy will be sent through an encrypted SSH connection to your remote server and out to the internet. Inbound traffic through the proxy is encrypted through the same connection.
(
Source)