LINUX连接openvpn
# MX-LINUX连接openvpn
# 安装
sudo apt-get install openvpn
1
# 准备服务端的配置
比如说这个:test.ovpn
client
dev tun
proto udp
remote [服务器的ip] 20000
resolv-retry infinite
nobind
persist-key
persist-tun
remote-cert-tls server
auth SHA512
cipher AES-256-CBC
#与server保持一致
comp-lzo
verb 3
#开启密码认证
auth-user-pass password.txt
<ca>
-----BEGIN CERTIFICATE-----
MIIDNDCCAhygAwIBAgIJAIMsHcbDkPGLMA0GCSqGSIb3DQEBCwUAMBUxEzARBgNV
BAMMCmhlc2hlbmdodW8wIBcNMjEwNDE5MDIxMDM2WhgPMjEyMTAzMjYwMjEwMzZa
...
tyRdANCvN9Y=
-----END CERTIFICATE-----
</ca>
key-direction 1
<tls-auth>
-----BEGIN OpenVPN Static key V1-----
6d1b31a5b66f89b063a9cfa22bcd261d
...
-----END OpenVPN Static key V1-----
</tls-auth>
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
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
这里用到了一个密码的文件,password.txt
yuandashuai
ypjgtrrpndc
1
2
2
# 连接
nohup openvpn --config /etc/openvpn/hilife-openvpn.ovpn > conn.log 2>&1 &
1
上次更新: 2024/08/08, 06:59:58