Search

ubuntu ssh proxy server, google chrome, do not proxy certain ip addresses

ubuntu ssh proxy server, google chrome, do not proxy certain ip addresses

I have set up a server with an SSH connection.
I want to use this as a proxy server for my ubuntu laptop at home.

This is the steps I have taken:
1: Create a passwordless login on the server using ssh keys and copy it to the remote server

ssh-keygen -t rsa -f ~/.ssh/serverkey_rsa
ssh-copy-id -i ~/.ssh/serverkey_rsa [email protected]

Enter your remote password (for the last time!) when prompted.
Optional but recommended: Try your new login

ssh [email protected]
If you are logged in without a password you are now safe to proceed to step 2.

2: Start a proxy forwarder on your local machine

ssh -C2TnN -D 8080 [email protected]
3: Start google chrome with proxy settings

google-chrome --proxy-server=socks5://localhost:8080 --no-proxy-server="127.0.*;localhost;192.168.*;10.10.*"
If you have certain servers that you want to skip the proxy for (such as http://www.whatismyip.com or the short version of it http://wimi.com) then add them to the –no-proxy-server section:

google-chrome --proxy-server=socks5://localhost:8080 --no-proxy-server="127.0.*;localhost;192.168.*;10.10.*;*.wimi.com;*.whatismyip.com"
I recommend not adding wimi.com to the section first to check if you are indeed routing through the server. If you are then the IP address displayed should be the IP address of the server rather than your own IP address.

You can make this system-wide if you wish, I will create a new article with a howto for that.

Related posts

Leave a Comment