Motivation
Although I asked ITSC for all of NJU's IP address ranges, they wouldn't give them to me. /_ \
Old Version Data
Daily Updated Data
Since I obtained authorization from CZ88 IP, I can update the IP ranges here daily (of course, CZ88 is not updated daily, the update date will be noted below).
It probably isn't necessary to do it every day, but since it's automated anyway, I love automation the most.
Your IP is, region:,.
| start | end | mask | mask_len | region |
|---|
IP address location data is supported by CZ88
Usage
nginx Traffic Splitting
Determine the source address; if it belongs to an 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 abandoned 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 use the VPN when accessing resources at NJU addresses.
Add the following content below dev tun in the existing .ovpn file, and remove the # comments