Search Docs by Keyword

Table of Contents

FASSE Proxy Settings

Using a proxy to reach the internet from FASSE cluster

If you are on FASSE or a VPN realm or server that is behind a firewall, there are times when you still need to reach the outside Internet. For example, you may need to install a condaStata, or R package. In that case, you will need to add a proxy setting to your environment.

Please note: Don’t set proxy on Cannon as it will back the internet. Our proxy does not allow all traffic, but should allow access to things necessary for your work.

Setting the proxy from the terminal

You can issue the following commands either manually each time you need access, or you can add them to your .bashrc so that the proxy is always configured when you log in or launch a new shell.

export http_proxy=http://rcproxy.rc.fas.harvard.edu:3128
export https_proxy=http://rcproxy.rc.fas.harvard.edu:3128

Setting the proxy for web browsing

For web browsing, your browser may work if set to ‘Use system proxy settings’ (Auto-detect proxy’ may also work). If this does not work automatically, you will need to manually add the proxies to your browser. You will need to disable this when not on the VPN.  Settings are as follows:

HTTP Proxy: http://rcproxy.rc.fas.harvard.edu
Port: 3128
HTTPS Proxy: http://rcproxy.rc.fas.harvard.edu
Port: 3128

The http:// is intentional for https_proxy. Your data are still encrypted between your web browser and the web server.

Also note that some applications only work if you give it the proxy address without the http://.  If your application is not working using the above definitions try: rcproxy.rc.fas.harvard.edu:3128

Setting proxy for sftp

For sftp you can add the ProxyCommand options like so (where username@example.com is the remote username and remote system you are connecting to) :

sftp -oProxyCommand='nc -X connect -x rcproxy.rc.fas.harvard.edu:3128 %h %p' username@example.com

Setting the proxy for Stata

Stata sometimes loads libraries via http.  For security reasons, http access on FASSE must happen via a proxy.  Proxy access can be configured in Stata with the following commands:

set httpproxy on
set httpproxyhost rcproxy.rc.fas.harvard.edu
set httpproxyport 3128

Proxy settings appear to persist after Stata is closed, so it is recommended to issue the following command when exiting stata:

set httpproxy off

Setting the proxy for RStudio

Occasionally, Installing a package on RStudio may require HTTP. You can set http_proxy to allow this from FASSE.  This can be done for one time use from within R:

Sys.setenv(http_proxy="http://rcproxy.rc.fas.harvard.edu:3128")
Sys.setenv(https_proxy="http://rcproxy.rc.fas.harvard.edu:3128")

It can also be set permanently by placing this in ~/.renviron:

http_proxy="http://rcproxy.rc.fas.harvard.edu:3128"
https_proxy="http://rcproxy.rc.fas.harvard.edu:3128"

You can run these from inside R to check that the proxies are set:

Sys.getenv("http_proxy")
Sys.getenv("https_proxy")

To unset these variables run:

Sys.unsetenv("http_proxy")
Sys.unsetenv("https_proxy")

Setting the proxy for Jupyter Notebook

You can run these commands to set the proxies on FASSE:

import os
os.environ['http_proxy'] = "http://rcproxy.rc.fas.harvard.edu:3128"
os.environ['https_proxy'] = "https://rcproxy.rc.fas.harvard.edu:3128"

If you get the output  <Response [200]>, proxies are appropriately set:

import requests
requests.get("https://google.com")
<Response [200]>

The steps above can be seen in the screen shot:

FASSE_Jupyter_Notebook_Proxies

Setting the proxy for the Virtual Remote Desktop’s Firefox

When working from the virtual remote desktop in FASSE you will have to configure Firefox manually.  To configure a proxy in Firefox go to Preferences>General>Connection Settings and configure as follows:

Github

Cloning a repository from Github does not work using ssh. You have to use https. For example:

git clone https://github.com/fasrc/User_Codes.git

And not:

git clone git@github.com:fasrc/User_Codes.git
© The President and Fellows of Harvard College
Except where otherwise noted, this content is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International license.