背景
IOS10更新后,Apple把VPN的PPTP给删了,目前只能使用IKEV2,IPSec,L2TP三种类型.以前是在DigtialOcean上架设的PPTP VPN,所以在网上寻找是否有架设L2TP的文章.
感谢好心人
找到秋水大大的一键安装脚本 L2TP/IPSec一键安装脚本
目前DigtialOcean上ubuntu14.04正常安装
DigtialOcean传送门,新用户有优惠
李笑来在linode上的script
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
| #!/bin/bash
# <UDF name="SERVER_PORT" Label="Shadowsocks Server Port" default="8388" /> # <UDF name="LOCAL_ADDRESS" Label="Local Address" default="127.0.0.1" /> # <UDF name="LOCAL_PORT" Label="Local Port" default="1080" /> # <UDF name="PASSWORD" Label="Password" /> # <UDF name="METHOD" Label="Method" default="rc4-md5" />
# <UDF name="L2TP_USERNAME" Label="L2TP Username" default="" /> # <UDF name="L2TP_PASSWORD" Label="L2TP Password" default="" /> # <UDF name="L2TP_PSK" Label="L2TP PSK" default="" />
cat >>/etc/gai.conf<<EOF precedence ::ffff:0:0/96 100 EOF
sudo apt-get update
sudo apt-get install -y python-pip pip install --upgrade pip
sudo pip install shadowsocks sudo apt-get install -y python-m2crypto
cat >>/etc/shadowsocks.json<<EOF { "server":"0.0.0.0", "server_port":$SERVER_PORT, "password":"$PASSWORD", "local_address":"$LOCAL_ADDRESS", "local_port":$LOCAL_PORT, "method":"$METHOD", "timeout":300 } EOF
sudo chmod 755 /etc/shadowsocks.json
cat >>/etc/rc.local<<EOF /usr/local/bin/ssserver –c /etc/shadowsocks.json EOF
sudo ssserver -c /etc/shadowsocks.json -d start
wget https://git.io/vpnsetup -O vpnsetup.sh sudo VPN_IPSEC_PSK=$L2TP_PSK VPN_USER=$L2TP_USERNAME VPN_PASSWORD=$L2TP_PASSWORD sh vpnsetup.sh
echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf
sysctl -p
reboot
|