OpenVPN 一键部署脚本


OpenVPN road warrior installer for Ubuntu, Debian, AlmaLinux, Rocky
Linux, CentOS and Fedora.

This script will let you set up your own VPN server in no more than a minute, even if you haven't used OpenVPN before. It has been designed to be as unobtrusive and universal as possible.

Run the script and follow the assistant:

wget -O && bash

[root@VM-0-10-centos ~]# wget && bash            #执行安装脚本
This server is behind NAT. What is the public IPv4 address or hostname?
Public IPv4 address / hostname []:       #监听的IP默认即可
Which protocol should OpenVPN use?
   1) UDP (recommended)
   2) TCP
Protocol [1]: 2             #协议我这里使用TCP
What port should OpenVPN listen to?
Port [1194]:                #端口可以额外制定,或者默认
Select a DNS server for the clients:
   1) Current system resolvers
   2) Google
   4) OpenDNS
   5) Quad9
   6) AdGuard
DNS server [1]: 3                       #DNS我这里选择1.1.1.1 DNS
Enter a name for the first client:
Name [client]: test                     #创建用户
The client configuration is available in: /root/test.ovpn
New clients can be added by running this script again.
[root@VM-0-10-centos ~]# sz /root/test.ovpn    #下载证书

标签: none