Linux下快速安装OPENVPN和连接

in Like with 0 comment

安装OPENVPN

apt install openvpn -y

允许OPENVPN启动conf配置文件,取消'AUTOSTART="all"的注释

nano /etc/default/openvpn

openvpn1.png

上传客户端配置文件client.conf到/etc/openvpn/目录下,并将其中的

auth-users-pass

修改为

auth-users-pass .secrets

在/etc/openvpn/目录下创建.secrets,将用户名和密码各一行的格式输入后保存

USERNAME
PASSWORD

打开开机自启动OPENVPN

systemctl enable openvpn@client.service
systemctl daemon-reload

启动和停止OPENVPN

systemctl start openvpn@client.service
systemctl stop openvpn@client.service
Comments are closed.