Motivation
Although I asked ITSC for all of NJU's IP address ranges, they wouldn't provide them. /_ \
Legacy Data
Daily Updated Data
Since I obtained authorization from Pure IP, I can now update the IP ranges here daily (of course, Pure IP doesn't update daily, the update date will be noted below).
Probably not necessary to update daily, but since it's automated anyway, I love automation.
Your IP is, region:,.
| start | end | mask | mask_len | region |
|---|
IP address location data is supported by Pure IP CZ88
Usage
nginx Traffic Splitting
Determine the source address, if it belongs to NJU IP, redirect to the server within NJU.
Define geo in /etc/nginx/nginx.conf:
Use in the server that needs redirection:
# filecodebox
server {
...
server_name example.com;
location / {
if ($njuip) {
return 302 https://nju.example.com$request_uri;
}
...
}
}
openvpn Traffic Splitting
Note: I have stopped using openvpn and switched to zerotier, the configuration here is not guaranteed to work.
Determine whether the destination address being accessed is an NJU address, only route through VPN when accessing NJU address resources.
Add the following content below dev tun in your existing .ovpn file, remove the # comments