SOCKS5 Proxy directly from bash

Ever needed a SOCKS5 proxy on the go without the need of keeping Putty up and running? Here it is:

ssh -f -N -D 0.0.0.0:YOUR_DESIRED_PORT_ABOVE_1024 localhost
  • you will be prompted to enter your password
  • you can run this under any non-root account
  • you cannot control WHO you’re proxying so I’d better change this often

Anyways, I hope you’re running the SSH server on a non-default port:

ssh -p YOUR_SSHD_CONFIG_PORT -f -N -D 0.0.0.0:YOUR_PORT localhost

And if you’re using a FoxyProxy-like-program, make sure to check Perform remote DNS lookups on hostnames loading through this proxy.

 

You might want to consider: this link for using Putty | the method above beautifully explained.

Advertisements

Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s