I'm trying to set up my Linode server (Ubuntu 12.04.4 LTS) to act as a L2TP/IPSec VPN server for when I'm traveling in China so that I can access Facebook/Twitter/YouTube on the go.
I've followed many tutorials on setting it up, but every time I get to checking the auth.log nothing comes though, and I just get the error that The VPN server did not respond.
I have checked my iptables, and ipsec verify comes through with everything [OK].
Could someone try and give me a command by command install for this? This is what I have been doing so far:
$ 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.