我正在尝试设置我的 Linode 服务器(Ubuntu 12.04.4 LTS)作为 L2TP/IPSec VPN 服务器,以便我在中国旅行时可以随时访问 Facebook/Twitter/YouTube。
我已经关注米An是关于设置的教程,但每次我检查时auth.log
都没有任何反应,只是收到错误The VPN server did not respond
。
我已检查过我的iptables
,并且ipsec verify
一切顺利[OK]
。
有人可以尝试通过命令安装给我一个命令吗?这是我到目前为止所做的:
$ sudo aptitude install openswan
// Use an X.509 certificate for this host? No
// Old runlevel management superseded
$ sudo nano /etc/ipsec.conf
// Deleted all, inserted this
version 2.0
config setup
nat_traversal=yes
virtual_private=%v4:10.0.0.0/8,%v4:192.168.0.0/16,%v4:172.16.0.0/12
oe=off
protostack=netkey
conn L2TP-PSK-NAT
rightsubnet=vhost:%priv
also=L2TP-PSK-noNAT
conn L2TP-PSK-noNAT
authby=secret
pfs=no
auto=add
keyingtries=3
rekey=no
ikelifetime=8h
keylife=1h
type=transport
left=[MY SERVER'S PUBLIC IP]
leftprotoport=17/1701
right=%any
rightprotoport=17/%any
$ sudo nano /etc/ipsec.secrets
// Deleted all, inserted this
[MY SERVER'S PUBLIC IP] %any: PSK "psk"
$ nano adjust-redirects
// Inserted this
for each in /proc/sys/net/ipv4/conf/*
do
sudo echo 0 > $each/accept_redirects
sudo echo 0 > $each/send_redirects
done
$ sudo bash adjust-redirects
$ sudo ipsec verify
// All OK except for Opportunistic Encryption Support which is disabled
$ sudo /etc/init.d/ipsec restart
// At this point I tried to connect while monitoring the log, nothing happened and I got the 'Server did not respond' error above.