The problem was to connect to a L2TP server from linux, no windows available.

The required packages:

<pre lang="bash">apt-get install l2tp-ipsec-vpn
reboot

Done the needed configuration but the connection was not established. The gui said error 500. The log said much but apparently not enough. Here is what could be considered as an error:

Oct 3 18:55:36 purple xl2tpd[4162]: setsockopt recvref[30]: Protocol not available
Oct 3 18:55:36 purple xl2tpd[4162]: This binary does not support kernel L2TP.

or

Oct 3 19:08:42 purple xl2tpd[4163]: death_handler: Fatal signal 15 received
Oct 3 19:08:42 purple L2tpIPsecVpnControlDaemon: Command service xl2tpd stop finished with exit code 0

However upon closer inspection neither seemed a real problem. The real problem seemed more likely to be:

Oct 3 18:56:58 purple pppd[4227]: Using interface ppp0
Oct 3 18:56:58 purple pppd[4227]: Connect: ppp0 <--> /dev/pts/4
Oct 3 18:56:58 purple pppd[4227]: CHAP authentication succeeded
Oct 3 18:56:58 purple pppd[4227]: <strong><span style="color: #ff0000;">LCP terminated by peer</span></strong>
Oct 3 18:56:58 purple xl2tpd[4163]: control_finish: Connection closed to 1.2.3.4, serial 1 ()
Oct 3 18:56:58 purple pppd[4227]: Modem hangup
Oct 3 18:56:58 purple xl2tpd[4163]: Terminating pppd: sending TERM signal to pid 4227

Hmm. Now what? Debug pppd by adding debug and dump to /etc/ppp/TEST.options.xl2tp

Now the real problem:

Oct 3 19:10:39 purple pppd[4608]: sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0>]
Oct 3 19:10:39 purple pppd[4608]: rcvd [CCP ConfReq id=0x0 <mppe +H -M +S -L -D -C>]
Oct 3 19:10:39 purple pppd[4608]: sent [CCP ConfRej id=0x0 <mppe +H -M +S -L -D -C>]
Oct 3 19:10:39 purple pppd[4608]: rcvd [IPCP ConfReq id=0x0 <addr 10.1.1.1>]
Oct 3 19:10:39 purple pppd[4608]: sent [IPCP ConfAck id=0x0 <addr 10.1.1.1>]
Oct 3 19:10:39 purple pppd[4608]: rcvd [CCP ConfRej id=0x1 <deflate 15> <deflate(old#) 15> <bsd v1 15>]
Oct 3 19:10:39 purple pppd[4608]: sent [CCP ConfReq id=0x2]
Oct 3 19:10:39 purple pppd[4608]: rcvd [IPCP ConfRej id=0x1 <compress VJ 0f 01>]
Oct 3 19:10:39 purple pppd[4608]: sent [IPCP ConfReq id=0x2 <addr 0.0.0.0>]
Oct 3 19:10:39 purple pppd[4608]: <span style="color: #ff0000;"><strong>rcvd [CCP TermReq id=0x1]</strong></span>
Oct 3 19:10:39 purple pppd[4608]: sent [CCP TermAck id=0x1]
Oct 3 19:10:39 purple pppd[4608]: rcvd [LCP TermReq id=0x1]
Oct 3 19:10:39 purple pppd[4608]: LCP terminated by peer
Oct 3 19:10:39 purple pppd[4608]: sent [LCP TermAck id=0x1]
Oct 3 19:10:39 purple xl2tpd[4547]: control_finish: Connection closed to 1.2.3.4, serial 1 ()

The solution! Add require-mppe to the /etc/ppp/TEST.options.xl2tp file

Comments:

Alan Wade -

L2PT protocol offers fabulous online security plus IPsec. It uses two means authentication procedure requiring computer-level authentication wherever digital certificates and alternative relevant info for initiating the IPSec session. Then, user-level authentication is additionally required requiring surgical procedure protocol for L2TP tunnel.