proxy ssh + socks
06 Oct 2011
Problem
- Facebook, Twitter, Youtube, etc are blocked.
Solution
- Route traffic through ssh tunnels.
Ingredients
- Unix account in an external host, eg; cjb.net, vps, etc
- Ssh client
- Traffic allowed through the 22 port (or any other port)
Procedure:
- Create an ssh tunnel:
[local]$ ssh -C2qTnN -D 9090 username@remote.machine
- Configure firefox to use the tunnel:
- Edit ➮ Preferences ➮ Advanced ➮ Network ➮ Settings ➮ Manual proxy configuration
- SOCKS Proxy 127.0.0.1 Port 9090
Extra
To get extra security connections can go through N nodes:
Firefox (local) ➟ host-1 ➟ host-2 ➟ host-n -> Internet
[local]$ ssh -C2qTnN username@host-1 -L 9090:localhost:9090 [host1]$ ssh -C2qTnN username@host-2 -L 9090:localhost:9090 ... ... [hostn-1]$ ssh -C2qTnN -D 9090 username@host-n
Happy hacking 😈