Tunnel whole system to a ssh server

To do what you are wanting, I recommend sshuttle https://github.com/apenwarr/sshuttle.
install :

sudo apt-get install sshuttle
sshuttle -r username@sshserver 0.0.0.0/0 -vv –dns
sshuttle –dns -vr username@sshserver 0.0.0.0/0 or

Tunnel Specific Program via Socks

If you only want to tunnel specific programs I would recommend proxychains :

  1. This will start a “SOCKS” proxy listening on :
    ssh -fND 127.0.0.1:<local port> username@sshserver

  2. Then edit /etc/proxychains.conf to point to the same port as .

  3. proxychains <program name>

Configuring a system-wide HTTP or SOCKS proxy

export http_proxy=http://127.0.0.1:9050
export https_proxy=http://127.0.0.1:9050
export ftp_proxy=http://127.0.0.1:9050
export all_proxy=http://127.0.0.1:9050
export no_proxy=”localhost,127.0.0.1,localaddress,.localdomain.com”

Use a HTTP proxy for chrome:
$ chrome-browser –proxy-server=”127.0.0.1:8123” –host-resolver-rules=”MAP * 0.0.0.0 , EXCLUDE foo.bar, *.domain”

OR

$ chrome-browser –proxy-server=”socks5://127.0.0.1:9050” –host-resolver-rules=”MAP * 0.0.0.0 , EXCLUDE *.youtube.*”