1.安装openvpn依赖
1 | yum install epel-release -y && yum install -y lzo lzo-devel openssl openssl-devel pam pam-devel pkcs11-helper pkcs11-helper-devel rpm-build iptables-services |
2.下载源码包并打包成rpm包
1 | wget http://oss.aliyuncs.com/aliyunecs/openvpn-2.2.2.tar.gz && rpmbuild -tb openvpn-2.2.2.tar.gz |
3.安装openvpn
1 | rpm -ivh /root/rpmbuild/RPMS/x86_64/openvpn-2.2.2-1.x86_64.rpm |
4.初始化KPI
1 | 1.修改变量 |
5.配置openvpn
1 | cp -a /usr/share/doc/openvpn-2.2.2/sample-config-files/server.conf /etc/openvpn/ && cp -a /usr/share/doc/openvpn-2.2.2/easy-rsa/2.0/keys/* /etc/openvpn/ |
6.设置iptables/启动openvpn
1 | 1.配置内核转发 |
- 本文作者: ChuLinx
- 本文链接: http://yoursite.com/2019/02/13/Centos7搭建openvpn服务/
- 版权声明: 本博客所有文章除特别声明外,均采用 MIT 许可协议。转载请注明出处!