tsocks provides a way to tunnel individual tty sessions or everything on a linux box through a SOCKS 4⁄5 proxy. What this enables you to do is use a SSH tunnel to proxy programs and applications through etc..
What do you need?
apt-get install tsocks
local = 192.168.0.0/255.255.255.0 server = 127.0.0.1 server_type = 5 server_port = 12345
Here, we assume we have created a dynamic ssh tunnel using lets say the following command:
ssh -D 12345 [email protected]
and we are telling tsocks to pass any traffic destined for the local network normally but anything else, will be ported through our proxy server (ssh tunnel).
To use this on an individual shell session run:
To use this system wide (be careful with this) create a file “/etc/ld.so.preload” with the contents:
Ohh and heres more on the man page.