Part of the flexibility of the OpenAthens managed proxy service is that you can use a simple forward proxy of your own as part of it. 

OpenAthens still does the complicated parts, but the final hop to the resource can come from a forward proxy under your direct control. This has several advantages including:

Squid is a widely used proxy available on most platforms under the GNU GPL (i.e. it's popular and free). Link:

Other forwarding proxies are available and will work in similar ways. Windows users will probably prefer to use IIS.



 There are a couple of differences between Debian and Red Hat derived systems which are highlighted below. Other distros will be similar.


  1. Install Squid. Most repositories include it, but you can also get binaries from

  2. Navigate to your install directory (/etc/squid)

  3. Create a password 

    1. > htpasswd -c squid_passwd

    2. Make a note of the username and password for later - you will need to tell OpenAthens what they are

  4. Edit squid.conf taking care to use the correct auth_param line for your distro.

    # Prevent X-Forwarded-For being overwritten by Squid
    forwarded_for transparent
    # Setup ACLs for OpenAthens
    auth_param basic program /usr/lib64/squid/basic_ncsa_auth /etc/squid/squid_passwd # RHEL / CentOS based distros
    # auth_param basic program /usr/lib/squid/basic_ncsa_auth /etc/squid/squid_passwd # Debian / Ubuntu based distros
    auth_param basic realm proxy
    acl authenticated proxy_auth REQUIRED
    # Allow authenticated access
    http_access allow authenticated
    # Deny all other access to this proxy
    http_access deny all
  5. Start Squid and set it to autostart according to your OS

  6. <squids_ip_address>:3128 should now show an error page generated by Squid

Securing the connection

You want to make sure that the inbound connection is limited to OpenAthens and this is secured using an X.509 client certificate. The process is a little different depending on which flavour of Linux you are using. 

Red Hat based such as CentOS

7. Add the following to your squid.conf file:

https_port cert=/etc/squid/ssl_cert/server.pem clientca=/etc/squid/ssl_cert/openathens-client.pem

8. Set your firewall rules to

9. Securely pass our service desk the username and password you set up in step 3 and a copy of your server.pem certificate. 

Debian based such as Ubuntu

At the time of writing the Squid package supplied by Debian is not compiled with the -enable-ssl flag which means the https_port configuration directive is not available and a little more work is required. Since you can't use a simple configuration directive you need to front Squid with something such as stunnel (  

7.  >apt-get install stunnel4

8. Create /etc/stunnel/stunnel.conf:

setuid = stunnel4
setgid = nogroup
accept  =
#Don't need to expose squid directly to the internet.
connect =
cert = /etc/stunnel/server.pem
verify = 4

9. Add the following to your squid.conf file:


10. Set your firewall rules to

11. Securely pass our service desk the username and password you set up in step 3 and a copy of your server.pem certificate. 

It is possible to set up squid in a multi-tennant mode - e.g. if different parts of your organisation or consortium have different scopes and need to present a different IP address depending on where in your organisation the user sits. Instructions for this are available from our service desk.