L2TP VPN Connection on Debian Squeeze

debian-squeezeipsecl2tpopenswanxl2tpd

I need to make an L2TP VPN connection from a Debian Squeeze server.

What I have is:

  • The server IP address
  • Shared Key
  • My username and password

Just using these 3 parameteres I can establish the VPN connection from my Mac OSX computer right from the Network panel in System Preferences.

To connect from Debian, after googling; I ended up with a "Openswan (IpSec) + XL2TP" solution (if you have a better alternative I can try that as well). However, connecting from Debian (by using openswan+xl2tp) involves configuring tens of parameters and unfortunately the system administrator of the VPN doesn't have any idea about the parameters I ask. He desperately claims, "it works on iphone/android/osx so it should work as well on linux." and unfortunately he is right.

What I want to ask is:

  1. Is openswan+xl2tp is the most simple and effective solution to use for this purpose?
  2. Since connection is successful from an OSX computer, is there anyone who can highlight the unshown but used parameters of OSX VPN connection? Or is there any way that I can display them?

Best Answer

We are also using a L2TP VPN connection and I could make it work on Ubuntu with openswan and xl2tp. I guess it should be similar on Debian.

It didn’t work right away, I had to play with the parameters.

It worked for me when I commented these lines:

#refuse-eap
#refuse-pap
#refuse-chap
#refuse-mschap
#refuse-mschap-v2
#require-mschap-v2

in /etc/ppp/your_vpn_connection_name.options.xl2tpd :

#debug
#dump
#record /var/log/pppd

plugin passprompt.so
ipcp-accept-local
ipcp-accept-remote
idle 72000
ktune
noproxyarp
asyncmap 0
#noccp
noauth
crtscts
lock
hide-password
modem
noipx

ipparam L2tpIPsecVpn-MyVPN

promptprog "/usr/bin/L2tpIPsecVpn"

#refuse-eap
#refuse-pap
#refuse-chap
#refuse-mschap
#refuse-mschap-v2
#require-mschap-v2

remotename ""
name "<your_username>"
password "<your_password>"

defaultroute

usepeerdns

Restart ipsec and xl2tp after modifying this file.

The logs on your Debian server or on the VPN server can also help to debug.