Failed to Connect to PPTP VPN Server on Ubuntu

I am trying to connect to a PPTP VPN server. The same config works fine in Windows but fails in Ubuntu 12.10. It must be some configuration issue.

sudo pptpsetup --create MYVPN --server xxx.xxx.xxx.xxx --username username --password password

Everything is setup correctly. But then when I try to actually run the VPN I get this:

$ sudo pppd call MYVPN updetach
Using interface ppp1
Connect: ppp1 <--> /dev/pts/2
LCP: timeout sending Config-Requests
Connection terminated.
Modem hangup

When I do this for more details:

tail -n 30 /var/log/syslog | grep -i ppp

Mar 18 06:33:08 tp pppd[5082]: pppd 2.4.5 started by root, uid 0
Mar 18 06:33:08 tp pppd[5082]: Using interface ppp1
Mar 18 06:33:08 tp pppd[5082]: Connect: ppp1 <--> /dev/pts/2
Mar 18 06:33:08 tp NetworkManager[988]:    SCPlugin-Ifupdown: devices added (path: /sys/devices/virtual/net/ppp1, iface: ppp1)
Mar 18 06:33:08 tp NetworkManager[988]:    SCPlugin-Ifupdown: device added (path: /sys/devices/virtual/net/ppp1, iface: ppp1): no ifupdown configuration found.
Mar 18 06:33:08 tp NetworkManager[988]: <warn> /sys/devices/virtual/net/ppp1: couldn't determine device driver; ignoring...
Mar 18 06:34:18 tp pppd[5082]: LCP: timeout sending Config-Requests
Mar 18 06:34:18 tp pppd[5082]: Connection terminated.
Mar 18 06:34:18 tp NetworkManager[988]:    SCPlugin-Ifupdown: devices removed (path: /sys/devices/virtual/net/ppp1, iface: ppp1)
Mar 18 06:34:18 tp pppd[5082]: Modem hangup
Mar 18 06:34:18 tp pptp[5084]: anon warn[decaps_hdlc:pptp_gre.c:216]: pppd may have shutdown, see pppd log
Mar 18 06:34:18 tp pppd[5082]: Exit.

Why is it not connecting? It works fine from Windows, so it must be something with Ubuntu 12.10 settings...

EDIT:

sudo pppd call MYVPN debug dump logfd 2 updetach

Is there any information about how to utilize this information to see what might have gone wrong?

    pppd options in effect:
debug       # (from command line)
updetach        # (from command line)
logfd 2     # (from command line)
dump        # (from command line)
noauth      # (from /etc/ppp/peers/MYVPN)
name username       # (from /etc/ppp/peers/MYVPN)
remotename MYVPN        # (from /etc/ppp/peers/MYVPN)
        # (from /etc/ppp/peers/MYVPN)
pty pptp xxx.xxx.xxx.xxx --nolaunchpppd     # (from /etc/ppp/peers/MYVPN)
crtscts     # (from /etc/ppp/options)
        # (from /etc/ppp/options)
asyncmap 0      # (from /etc/ppp/options)
lcp-echo-failure 4      # (from /etc/ppp/options)
lcp-echo-interval 30        # (from /etc/ppp/options)
hide-password       # (from /etc/ppp/options)
ipparam MYVPN       # (from /etc/ppp/peers/MYVPN)
nobsdcomp       # (from /etc/ppp/peers/MYVPN)
nodeflate       # (from /etc/ppp/peers/MYVPN)
noipx       # (from /etc/ppp/options)
using channel 27
Using interface ppp1
Connect: ppp1 <--> /dev/pts/2
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x4e812c17> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x4e812c17> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x4e812c17> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x0 <mru 1400> <auth chap MD5> <magic 0x27f847d4> <pcomp> <accomp> <callback CBCP> <mrru 1614> <endpoint [local:f8.7d.55.9e.60.00.42.53.ac.37.23.b6.c9.f4.6d.2f.00.00.00.00]> < 17 04 01 00>]
sent [LCP ConfRej id=0x0 <callback CBCP> <mrru 1614> < 17 04 01 00>]
rcvd [LCP ConfReq id=0x1 <mru 1400> <auth chap MD5> <magic 0x27f847d4> <pcomp> <accomp> <callback CBCP> <mrru 1614> <endpoint [local:f8.7d.55.9e.60.00.42.53.ac.37.23.b6.c9.f4.6d.2f.00.00.00.00]> < 17 04 01 00>]
sent [LCP ConfRej id=0x1 <callback CBCP> <mrru 1614> < 17 04 01 00>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x4e812c17> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x4e812c17> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x4e812c17> <pcomp> <accomp>]
rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x4e812c17> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x4e812c17> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x4 <mru 1400> <auth chap MD5> <magic 0x27f847d4> <pcomp> <accomp> <callback CBCP> <mrru 1614> <endpoint [local:f8.7d.55.9e.60.00.42.53.ac.37.23.b6.c9.f4.6d.2f.00.00.00.00]> < 17 04 01 00>]
sent [LCP ConfRej id=0x4 <callback CBCP> <mrru 1614> < 17 04 01 00>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x4e812c17> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x6 <mru 1400> <auth chap MD5> <magic 0x27f847d4> <pcomp> <accomp> <endpoint [local:f8.7d.55.9e.60.00.42.53.ac.37.23.b6.c9.f4.6d.2f.00.00.00.00]>]
sent [LCP ConfAck id=0x6 <mru 1400> <auth chap MD5> <magic 0x27f847d4> <pcomp> <accomp> <endpoint [local:f8.7d.55.9e.60.00.42.53.ac.37.23.b6.c9.f4.6d.2f.00.00.00.00]>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x4e812c17> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x4e812c17> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x4e812c17> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x4e812c17> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x9 <mru 1400> <auth chap MD5> <magic 0x27f847d4> <pcomp> <accomp> <endpoint [local:f8.7d.55.9e.60.00.42.53.ac.37.23.b6.c9.f4.6d.2f.00.00.00.00]>]
sent [LCP ConfAck id=0x9 <mru 1400> <auth chap MD5> <magic 0x27f847d4> <pcomp> <accomp> <endpoint [local:f8.7d.55.9e.60.00.42.53.ac.37.23.b6.c9.f4.6d.2f.00.00.00.00]>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x4e812c17> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x4e812c17> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x4e812c17> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x4e812c17> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0xc <mru 1400> <auth chap MD5> <magic 0x27f847d4> <pcomp> <accomp> <endpoint [local:f8.7d.55.9e.60.00.42.53.ac.37.23.b6.c9.f4.6d.2f.00.00.00.00]>]
sent [LCP ConfAck id=0xc <mru 1400> <auth chap MD5> <magic 0x27f847d4> <pcomp> <accomp> <endpoint [local:f8.7d.55.9e.60.00.42.53.ac.37.23.b6.c9.f4.6d.2f.00.00.00.00]>]
LCP: timeout sending Config-Requests
Connection terminated.
Modem hangup
Waiting for 1 child processes...
  script pptp xxx.xxx.xx.xxx --nolaunchpppd, pid 6815
Script pptp xxx.xxx.xx.xxx --nolaunchpppd finished (pid 6815), status = 0x0

Solution 1:

I experienced exactly the same issue on my VPN, which started after installing Utopic HWE kernel 3.16.0 on Ubuntu 14.04 LTS.

After researching I found the root cause of the issue:

Using interface ppp0
Connect: ppp0 <--> /dev/pts/4
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <auth chap MS-v2> <magic0x792e9abe> <pcomp> <accomp>]  
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <auth chap MS-v2> <magic 0x792e9abe> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <auth chap MS-v2> <magic 0x792e9abe> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <auth chap MS-v2> <magic 0x792e9abe> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <auth chap MS-v2> <magic 0x792e9abe> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <auth chap MS-v2> <magic 0x792e9abe> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <auth chap MS-v2> <magic 0x792e9abe> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <auth chap MS-v2> <magic 0x792e9abe> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <auth chap MS-v2> <magic 0x792e9abe> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <auth chap MS-v2> <magic 0x792e9abe> <pcomp> <accomp>]
LCP: timeout sending Config-Requests
Connection terminated.
Modem hangup

The root cause was that 2 required netfilter kernel modules are not loaded during boot:

nf_conntrack_pptp
nf_conntrack_proto_gre

Solution: load the nf_conntrack_pptp module, the latter is its dependency and will be loaded automatically.

sudo modprobe nf_conntrack_pptp

References:

  • http://pptpclient.sourceforge.net/howto-diagnosis.phtml#lcp_timeout
  • http://ubuntuforums.org/showthread.php?t=2182790

Solution 2:

I have googled 'LCP: timeout sending Config-Requests' for a while, and can't find a solution. Some posts said it is related with router setting, but I have my MAC and android phone connected without problem, so it is not my router's problem.

After poking ppp setting around, I find solution working for me. Edit /etc/ppp/options, enable option silent, then problem solved.

    # With this option, pppd will not transmit LCP packets to initiate a
    # connection until a valid LCP packet is received from the peer (as for
    # the "passive" option with old versions of pppd).
    silent

I use Ubuntu 12.04, and setup VPN from GUI

Solution 3:

For the majority of distributions you must load the nf_conntrack_pptp and nf_conntrack_proto_gre kernel modules for certain PPTP/VPN servers. This can be done with:

$ sudo modprobe nf_conntrack_pptp

(nf_conntrack_proto_gre is loaded automatically as a dependency of nf_conntrack_pptp)