-
open
~/.ssh/configand addHost socksproxy HostName 1.2.3.4 BatchMode yes RequestTTY no Compression yes DynamicForward localhost:8123 IdentityFile ~/.ssh/proxy_rsa User username -
open
~/.bashrcand addalias socksproxy='/usr/bin/firefox -no-remote -P socksproxy && ssh -nkN socksproxy' -
open firefox, in the url bar type
about:profilesand create a new profile calledsocksproxyload socksproxy profile open Preferences -> Network Settings -> Manual proxy configuration -> SOCKS Host set to localhost and Port to 8123, underNo proxy foraddlocalhost, 127.0.0.1. ActivateProxy DNS when using SOCKS v5and click ok. -
open terminal and type
$ socksproxy -
wait until firefox profile is open and check your ip address. It should be the ip address of the proxy server.
Warning: May show warning Firefox is already running. Just click ok and refresh socksproxy profile of firefox.
For chrome browser to use proxy server open ~/.bashrc and add
chromeproxy() { /usr/bin/google-chrome --proxy-server="socks5://localhost:8123" --host-resolver-rules="MAP * ~NOTFOUND , EXCLUDE localhost" "$@" & }
alias socksproxychrome='chromeproxy && ssh -nkN socksproxy'