forked from stunnel/Ocserv-install-script-for-CentOS-RHEL-7
-
Notifications
You must be signed in to change notification settings - Fork 0
/
change-to-ca.sh
147 lines (145 loc) · 4.44 KB
/
change-to-ca.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
#证书登录
cat << EOF > /usr/local/etc/ocserv/ocserv.conf
#证书登录
auth = "certificate"
max-clients = 1024
max-same-clients = 16
tcp-port = 10443
udp-port = 10443
keepalive = 32400
dpd = 90
mobile-dpd = 1800
try-mtu-discovery = true
server-cert = /usr/local/etc/ocserv/ca/server-cert.pem
server-key = /usr/local/etc/ocserv/ca/server-key.pem
ca-cert = /usr/local/etc/ocserv/ca/ca-cert.pem
cert-user-oid = 2.5.4.3
tls-priorities = "NORMAL:%SERVER_PRECEDENCE:%COMPAT:-VERS-SSL3.0"
auth-timeout = 40
min-reauth-time = 120
cookie-timeout = 300
deny-roaming = false
rekey-time = 172800
rekey-method = ssl
use-utmp = true
use-occtl = true
pid-file = /var/run/ocserv.pid
socket-file = /var/run/ocserv-socket
run-as-user = nobody
run-as-group = daemon
device = vpns
output-buffer = 23000
# default-domain = example.com
ipv4-network = 10.0.1.0
ipv4-netmask = 255.255.255.0
dns = 8.8.8.8
dns = 8.8.4.4
ping-leases = false
cisco-client-compat = true
no-route = 0.0.0.0/254.0.0.0
no-route = 14.0.0.0/255.0.0.0
no-route = 27.0.0.0/255.0.0.0
no-route = 36.0.0.0/255.0.0.0
no-route = 39.0.0.0/255.0.0.0
no-route = 42.0.0.0/254.0.0.0
no-route = 45.64.0.0/255.192.0.0
no-route = 47.80.0.0/255.240.0.0
no-route = 47.96.0.0/255.224.0.0
no-route = 49.0.0.0/255.0.0.0
no-route = 54.222.0.0/255.254.0.0
no-route = 58.0.0.0/254.0.0.0
no-route = 60.0.0.0/254.0.0.0
no-route = 91.232.0.0/255.248.0.0
no-route = 101.0.0.0/255.0.0.0
no-route = 102.0.0.0/254.0.0.0
no-route = 106.0.0.0/255.0.0.0
no-route = 110.0.0.0/254.0.0.0
no-route = 112.0.0.0/240.0.0.0
no-route = 139.0.0.0/255.240.0.0
no-route = 139.128.0.0/255.254.0.0
no-route = 139.148.0.0/255.254.0.0
no-route = 139.152.0.0/255.248.0.0
no-route = 139.170.0.0/255.255.0.0
no-route = 139.176.0.0/255.255.0.0
no-route = 139.183.0.0/255.255.0.0
no-route = 139.186.0.0/255.255.0.0
no-route = 139.188.0.0/255.252.0.0
no-route = 139.192.0.0/255.224.0.0
no-route = 139.224.0.0/255.255.0.0
no-route = 139.226.0.0/255.254.0.0
no-route = 140.75.0.0/255.255.0.0
no-route = 140.143.0.0/255.255.0.0
no-route = 140.205.0.0/255.255.0.0
no-route = 140.206.0.0/255.254.0.0
no-route = 140.210.0.0/255.255.0.0
no-route = 140.224.0.0/255.255.0.0
no-route = 140.237.0.0/255.255.0.0
no-route = 140.240.0.0/255.255.0.0
no-route = 140.243.0.0/255.255.0.0
no-route = 140.246.0.0/255.255.0.0
no-route = 140.249.0.0/255.255.0.0
no-route = 140.250.0.0/255.255.0.0
no-route = 140.255.0.0/255.255.0.0
no-route = 144.0.0.0/255.254.0.0
no-route = 144.6.0.0/255.254.0.0
no-route = 144.12.0.0/255.255.0.0
no-route = 144.52.0.0/255.252.0.0
no-route = 144.122.0.0/255.254.0.0
no-route = 144.255.0.0/255.255.0.0
no-route = 150.0.0.0/255.192.0.0
no-route = 150.115.0.0/255.255.0.0
no-route = 150.121.0.0/255.255.0.0
no-route = 150.122.0.0/255.255.0.0
no-route = 150.128.0.0/255.254.0.0
no-route = 150.138.0.0/255.254.0.0
no-route = 150.223.0.0/255.255.0.0
no-route = 150.242.0.0/255.255.0.0
no-route = 150.254.0.0/255.254.0.0
no-route = 152.104.0.0/255.248.0.0
no-route = 153.0.0.0/255.254.0.0
no-route = 153.3.0.0/255.255.0.0
no-route = 153.34.0.0/255.254.0.0
no-route = 153.36.0.0/255.254.0.0
no-route = 153.96.0.0/255.252.0.0
no-route = 153.100.0.0/255.254.0.0
no-route = 153.118.0.0/255.254.0.0
no-route = 157.0.0.0/255.240.0.0
no-route = 157.16.0.0/255.252.0.0
no-route = 157.61.0.0/255.255.0.0
no-route = 157.122.0.0/255.255.0.0
no-route = 157.148.0.0/255.255.0.0
no-route = 157.156.0.0/255.252.0.0
no-route = 157.255.0.0/255.255.0.0
no-route = 159.226.0.0/255.255.0.0
no-route = 161.207.0.0/255.255.0.0
no-route = 162.105.0.0/255.255.0.0
no-route = 163.0.0.0/255.254.0.0
no-route = 163.44.0.0/255.252.0.0
no-route = 163.48.0.0/255.240.0.0
no-route = 163.125.0.0/255.255.0.0
no-route = 163.136.0.0/255.248.0.0
no-route = 163.177.0.0/255.255.0.0
no-route = 163.178.0.0/255.254.0.0
no-route = 163.204.0.0/255.255.0.0
no-route = 166.110.0.0/255.254.0.0
no-route = 167.139.0.0/255.255.0.0
no-route = 167.189.0.0/255.255.0.0
no-route = 168.160.0.0/255.255.0.0
no-route = 171.0.0.0/255.128.0.0
no-route = 171.208.0.0/255.240.0.0
no-route = 175.0.0.0/255.0.0.0
no-route = 180.0.0.0/252.0.0.0
no-route = 192.124.154.0/255.255.254.0
no-route = 192.188.168.0/255.255.252.0
no-route = 202.0.0.0/254.0.0.0
no-route = 210.0.0.0/254.0.0.0
no-route = 218.0.0.0/254.0.0.0
no-route = 220.0.0.0/252.0.0.0
#网易云音乐
no-route = 123.150.52.196/255.255.255.0
no-route = 123.150.53.156/255.255.255.0
no-route = 60.165.45.14/255.255.255.0
no-route = 115.102.0.50/255.255.255.0
no-route = 123.58.180.105/255.255.255.0
no-route = 222.170.95.35/255.255.255.0
EOF