安装openVpn
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
| yum install epel-release
yum install snapd
systemctl enable --now snapd.socket
ln -s /var/lib/snapd/snap /snap
snap install openfortivpn
yum install openfortivpn
mkdir openfortivpn
vim config
host = xxx
port = 443
username = xxx
password = xxx
#防止vpn路由和服务器冲突
#set-routes=0
#pppd-ipparam=x.x.x.x
#set-dns = 0
#pppd-use-peerdns = 0
# X509 certificate sha256 sum, trust only this one!
trusted-cert = xxx
vim start.sh
nohup openfortivpn -c config >vpn.log 2>&1 &
|
路由冲突
1
2
3
4
5
6
7
8
| # 查看路由表
route -n
# 指定ip走vpn路由
ip route add x.x.x.x/x via x.x.x.x
# 重启网络
systemctl restart network
|
文章作者
lim
上次更新
2024-11-21
(1dac9ff)
许可协议
CC BY-NC-ND 4.0