mirror of
https://github.com/QSCTech/zjunet.git
synced 2026-01-22 19:54:48 +08:00
update static route list, fixes #18
This commit is contained in:
parent
e31f973fd7
commit
7e51715f8f
24
vpn.sh
24
vpn.sh
@ -27,6 +27,9 @@ set_up_routes() {
|
|||||||
|
|
||||||
gateway=$(ip route get 10.10.0.21 | grep via | awk '{print $3}')
|
gateway=$(ip route get 10.10.0.21 | grep via | awk '{print $3}')
|
||||||
|
|
||||||
|
ip route replace 10.5.1.0/24 via $gateway # for LNS
|
||||||
|
ip route replace 10.10.0.0/24 via $gateway # for DNS
|
||||||
|
|
||||||
case "$ip" in
|
case "$ip" in
|
||||||
10.189.*)
|
10.189.*)
|
||||||
;;
|
;;
|
||||||
@ -34,8 +37,25 @@ set_up_routes() {
|
|||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
# 内网静态路由
|
# 内网静态路由
|
||||||
ip route delete 10.0.0.0/8 > /dev/null
|
# See also: #18 (thanks Hexcles Ma)
|
||||||
ip route add 10.0.0.0/8 via $gateway
|
ip route replace 10.0.0.0/8 via $gateway
|
||||||
|
|
||||||
|
# Some classroom computers (especially East 6,7)
|
||||||
|
ip route replace 58.196.192.0/19 via $gateway
|
||||||
|
ip route replace 58.196.224.0/20 via $gateway
|
||||||
|
ip route replace 58.200.100.0/24 via $gateway
|
||||||
|
|
||||||
|
# The public CERNET IP of most ZJU servers, which can be reached directly in the Intranet.
|
||||||
|
# Most of them do have a 10.* IP, but sometimes school DNS just returns the public ones.
|
||||||
|
ip route replace 210.32.0.0/20 via $gateway
|
||||||
|
ip route replace 210.32.128.0/19 via $gateway
|
||||||
|
ip route replace 210.32.160.0/21 via $gateway
|
||||||
|
ip route replace 210.32.168.0/22 via $gateway
|
||||||
|
ip route replace 210.32.172.0/23 via $gateway
|
||||||
|
ip route replace 210.32.176.0/20 via $gateway
|
||||||
|
|
||||||
|
# 玉泉和我们 vpn 后的 ip
|
||||||
|
ip route replace 222.205.0.0/17 via $gateway
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user