Debian, Ubuntu 和 CentOS一键安装openVPN安装包和客户端设置教程 有附件 经验

escun 2019-3-19 7605


SSH下,安装:

wget https://git.io/vpn -O openvpn-install.sh && bash openvpn-install.sh

适用于Debian, Ubuntu 和 CentOS 。

via:https://github.com/Nyr/openvpn-install

步骤:以下是在centos 6.1中进行测试可用

1、IP address直接列出服务器外网IP,保持默认直接回车

2、UDP\TCP优先选择TCP,输入2回车

3、访问端口自行设置,我这里设置1000回车

(端口要在iptables中放行)

iptables -I INPUT -p tcp --dport 1000 -j ACCEPT
iptables-save > /etc/sysconfig/iptables

4、dns设置,输入1回车

Welcome to this OpenVPN "road warrior" installer!
I need to ask you a few questions before starting the setup.
You can leave the default options and just press enter if you are ok with them.
First, provide the IPv4 address of the network interface you want OpenVPN
listening to.
IP address: x.x.x.x
Which protocol do you want for OpenVPN connections?
   1) UDP (recommended)
   2) TCP
Protocol [1-2]: 2
What port do you want OpenVPN listening to?
Port: 1000
Which DNS do you want to use with the VPN?
   1) Current system resolvers
   2) 1.1.1.1
   3) Google
   4) OpenDNS
   5) Verisign
DNS [1-5]: 1
Finally, tell me your name for the client certificate.
Please, use one word only, no special characters.
Client name: client1
Okay, that was all I needed. We are ready to set up your OpenVPN server now.
Press any key to continue...
Certificate is to be certified until Mar 16 08:04:05 2029 GMT (3650 days)
Write out database with 1 new entries
Data Base Updated
Using SSL: openssl OpenSSL 1.0.1e-fips 11 Feb 2013
Generating a 2048 bit RSA private key
.....................................................+++
........................................................+++
writing new private key to '/etc/openvpn/easy-rsa/pki/private/client1.key.bneNatHjo6'
-----
Using configuration from /etc/openvpn/easy-rsa/pki/safessl-easyrsa.cnf
Check that the request matches the signature
Signature ok
The Subject's Distinguished Name is as follows
commonName            :PRINTABLE:'client1'
Certificate is to be certified until Mar 16 08:04:06 2029 GMT (3650 days)
Write out database with 1 new entries
Data Base Updated
Using SSL: openssl OpenSSL 1.0.1e-fips 11 Feb 2013
Using configuration from /etc/openvpn/easy-rsa/pki/safessl-easyrsa.cnf
An updated CRL has been created.
CRL file: /etc/openvpn/easy-rsa/pki/crl.pem
Shutting down openvpn:                                     [  OK  ]
Starting openvpn:                                          [  OK  ]
Finished!
Your client configuration is available at: /root/client1.ovpn
If you want to add more clients, you simply need to run this script again!

安装成功提示,生成好了client1.ovpn,用这个文件导入到openvpn手机或PC端连接即可使用。

更多openVPN客户端使用方法:

西南财经大学

关于校外访问校内网络服务及VPN服务的说明


上传的附件:
最新回复 (0)
    • 四川民族学院论坛
      2
        登录 注册 QQ登录
返回