使用 Linux 脚本一键快速搭建自己的 IPsec VPN 服务器。支持 IPsec/L2TP 和 Cisco IPsec 协议,可用于 Ubuntu/Debian/CentOS 系统。你只需提供自己的 VPN 登录凭证,然后运行脚本自动完成安装。
系统要求
- Ubuntu 18.04 (Bionic), 16.04 (Xenial) or 14.04 (Trusty)
- Debian 9 (Stretch) or 8 (Jessie)
- CentOS 7 (x86_64) with Updates
- CentOS 6 (x86_64) with Updates
安装说明
Ubuntu & Debian
首先,更新你的系统: 运行 apt-get update && apt-get dist-upgrade
并重启。这一步是可选的,但推荐。
要安装 VPN,请从以下选项中选择一个:
选项 1: 使用脚本随机生成的 VPN 登录凭证 (完成后会在屏幕上显示):
1 | wget https://git.io/vpnsetup -O vpnsetup.sh && sudo sh vpnsetup.sh |
选项 2: 编辑脚本并提供你自己的 VPN 登录凭证:
1 | wget https://git.io/vpnsetup -O vpnsetup.sh |
选项 3: 将你自己的 VPN 登录凭证定义为环境变量:
1 | # 所有变量值必须用 '单引号' 括起来 |
CentOS & RHEL
首先,更新你的系统: 运行 yum update
并重启。这一步是可选的,但推荐。
按照与上面相同的步骤,但是将 https://git.io/vpnsetup
换成 https://git.io/vpnsetup-centos
。