Skip to content

Using FoxyProxy to easily switch on/off usage of proxy#

First, you need to open a ssh tunnel:

ssh -D 8080 lxtunnel.cern.ch -N -l <your-cern-username>

This command is always needed, as it opens the proxy connection to the CERN network. If you enter this command in a terminal it will ask you for your CERN password and other than that it seems that nothing will happen. Just don't close the terminal window, because otherwise the tunnel will close again.

Now you need to configure your browser to use this tunnel. In Firefox, if you follow the standard instructions, you need to go to Settings -> General -> Network Settings. You need to select a manual proxy configuration with a SOCKS Host with the name localhost and put the same port number as in the ssh command above. Select SOCKS_v5 and also check the Proxy DNS when using SOCKS v5 box.

After you are finished with using the proxy you need to change the proxy settings again and repeat the procedure every time you want to connect to the CERN network. In order to avoid having to change the settings every time you can also use a browser addon like FoxyProxy for Firefox. It allows to enable/disable the proxy with a click of a button after you have entered the configuration once.

Open FoxyProxy and add a proxy connection with the settings as shown in the image below. Note that the port number must match the one from the ssh command above


After everything is set up you can use the button to switch between using the proxy and using the default connection. If you want you can also enter certain patterns, to enable the proxy automatically for specific websites only. Otherwise all your internet traffic from your browser is send through the proxy as long as it is enabled. An example of such a pattern list is available in the json format under this link.