Skip to content

Instantly share code, notes, and snippets.

@hxtree
Created March 5, 2020 19:44
Show Gist options
  • Select an option

  • Save hxtree/3c2b88b48759df63c26a14dded73eacf to your computer and use it in GitHub Desktop.

Select an option

Save hxtree/3c2b88b48759df63c26a14dded73eacf to your computer and use it in GitHub Desktop.
EZProxy Set Traffic to Different IP Addresses For JSTOR
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0 eth0:0
allow-hotplug eth0 eth0:0
iface eth0 inet static
address 10.1.1.1
gateway 10.1.1.1
netmask 255.255.0.0
dns-nameservers 8.8.8.8
dns-search example.com
iface eth0:0 inet static
address 10.1.1.2
gateway 10.1.1.1
netmask 255.255.0.0
dns-nameservers 8.8.8.8
dns-search example.com
# ===================================================================
# EzProxy Config
# ===================================================================
# server's name
Name ezproxy.example.com
# enable audit logs available in admin interface purged after 30 days
Audit Most Login.Success.Groups
AuditPurge 30
# rewrites hostnames with hyphens for Wildcard Cert
Option ForceWildcardCertificate
# changes the login menu page
LoginMenu https://www.example.com/library/
# enable the new Proxy by hostname option
Option ProxyByHostname
# disable insecure SSL
Option DisableSSL56bit
Option DisableSSL40bit
Option DisableSSLv2
# ensure users aren’t sending their password over the internet unsecured
Option ForceHTTPSLogin
# use port 80 for cleanliness - requires ezproxy to be started as root
LoginPort 80
LoginPortSSL 443
MaxVirtualHosts 2400
# if computer is on-campus or dial-up, no need to proxy them
ExcludeIP 10.0.0.0-10.255.255.255
# for testing -- comment out for prod
IncludeIP 10.0.0.4
# ===================================================================
# IPAddress
# Allows users determine their IP address. It is useful as Alumni must have a different IP address to access JSTOR
# ===================================================================
Group IPAddress
Title WhatIsMyIP
URL http://whatismyip.com
DJ whatismyip.com
# ===================================================================
# Jstor
# Allows users to access JSTOR. This must be a separate group as JSTOR can be accessed by both Alumni and Everyone else.
# ===================================================================
Group Jstor
Option DomainCookieOnly
Title JSTOR
HTTPHeader -request -process X-Requested-With
URL http://www.jstor.org/
HJ https://www.jstor.org
HJ www.jstor.org
HJ www.jstore.org
HJ jstor.org
HJ jstore.org
HJ dfr.jstor.org
HJ labs.jstor.org
HJ links.jstor.org
HJ mobile.jstor.org
HJ about.jstor.org
HJ plants.jstor.org
HJ https://uk.jstor.org
HJ https://dfr.jstor.org
HJ https://labs.jstor.org
HJ https://links.jstor.org
HJ https://mobile.jstor.org
HJ https://about.jstor.org
HJ https://plants.jstor.org
HJ https://uk.jstor.org
DJ jstor.org
Option Cookie
# ===================================================================
# Library
# This is the standard Library group
# ===================================================================
Group Library
# Place everything else here
::group=IPAddress+Jstor+Library
::LDAP
URL ldaps://ldap.example.com/ou=people,dc=example,dc=com?uid?one?(|(group=employee)(group=library))
Group IPAddress+Jstor+Library
/LDAP
::group=IPAddress+Jstor
::LDAP
URL ldaps://ldap.example.com/ou=people,dc=example,dc=com?uid?one?(|(group=alumni))
Group IPAddress+Jstor; SourceIP 10.1.1.2
/LDAP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment