-
open
~/.ssh/config
and addHost socksproxy HostName 1.2.3.4 BatchMode yes RequestTTY no Compression yes DynamicForward localhost:8123 IdentityFile ~/.ssh/proxy_rsa User username
-
open
~/.bashrc
and addalias socksproxy='/usr/bin/firefox -no-remote -P socksproxy && ssh -nkN socksproxy'
-
open firefox, in the url bar type
about:profiles
and create a new profile calledsocksproxy
load socksproxy profile open Preferences -> Network Settings -> Manual proxy configuration -> SOCKS Host set to localhost and Port to 8123, underNo proxy for
addlocalhost, 127.0.0.1
. ActivateProxy DNS when using SOCKS v5
and 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'