15

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
3
  • execute "sudo pppd call MYVPN debug dump logfd 2 nodetach" to see more information
    – user141244
    Mar 18, 2013 at 6:56
  • many thanks. I have updated the question. How can I utilize this information to find the problem?
    – Houman
    Mar 18, 2013 at 7:53
  • In my case the problem was with the ISP router, I'd have to configure the "PPTP PassThrough" to enable those connections. :O
    – user644350
    Jan 19, 2017 at 18:36

7 Answers 7

15

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:

2
  • these filters were required on the VPN server node or client ?
    – Ahmed
    Jul 25, 2016 at 10:28
  • 1
    @Ahmed On the server that runs pptpd
    – Terry Wang
    Jul 27, 2016 at 0:32
5

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

2
  • This helped me with my Mac as a server and Android as a client connection. I was using iVPN and had to create the options file, but after doing that and restarting iVPN, it worked! Thanks for the tip.
    – CWSpear
    Jul 1, 2014 at 7:03
  • These settings did not work for me, on raspberry pi using it as vpn server (pptpd)
    – Ahmed
    Jul 25, 2016 at 10:36
5

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)

2
  • 1
    1. Only worked in reverse order: modprobe nf_conntrack_pptp nf_conntrack_proto_gre. 2. This helps me, but only for one VPN connection. After the client disconnects, the modules need to be loaded again. I only found a bruteforce solution: askubuntu.com/questions/599523/…, do you have a better one? May 14, 2015 at 9:10
  • Instead of typing the commands in the terminal, you could make an Icon-Script-Launcher that loads the modules. This way, you should click on before you activate the VPN connection. If there is a better way: Unfortunately I do not know why the modules get unloaded after each disconnection. I would like this not to happen obviously. If I find a solution I will let you know. So far for me they do not get unloaded (not using ubuntu). However, I suspect that this happened to me also, some months ago. May 14, 2015 at 10:02
2

Mar 18 06:34:18 tp pppd[5082]: LCP: timeout sending Config-Requests

This may be an issue with GRE (ip 47) protocol. Check this page:

http://pptpclient.sourceforge.net/howto-diagnosis.phtml#lcp_timeout

Also try to connect to 1723 on pptp server:

telnet "server-ip-or-host" 1723

If this port is not blocked I recommend to check firewall settings on computer and router(some routers have pptp/gre passthrough option)

1
  • +1 for passthrough. For some routers you need to enable pptp and/or ipsec passthrough in your router settings and add your machine's mac address to the passthrough list. Aug 20, 2016 at 17:46
1

Did not helped any other solution but i found out another solution. Had the same error that is trying to connect but is timing out.

Debug

I did $ tail -f /var/log/syslog and saw a around 10 lines of these messages:

Apr 21 22:20:37 user-pc kernel: [ 3008.652602] [UFW BLOCK] IN=wlxxxxxxxxxxxx OUT= MAC=00:a0:a0:00:00:00:a0:a0:a0:00:00:00:00:00 SRC=111.222.333.444 DST=111.222.333.444 LEN=54 TOS=0x00 PREC=0x00 TTL=59 ID=43069 PROTO=47

And after that a failure message

Apr 21 22:20:38 tp pppd[5082]: LCP: timeout sending Config-Requests

Fix

Since I saw [UFW BLOCK] I found out that UFW (firewall) is blocking incoming traffic. Then added rule to UFW to allow the traffic from my VPN client with this command:

$ sudo ufw allow proto gre from [ip_of_pptp_server]
$ sudo service ufw restart

then I tried to reconnect PPTP VPN and it worked.

1
  • This solution worked for me.. but before trying this option i tried "sudo modprobe nf_conntrack_pptp nf_conntrack_proto_gre" Jul 18, 2021 at 5:52
0

SOLUTION : We also had the same problem. The issue is because of the mismatch of pptp client version & ubuntu version. Instead of apt-get we manually need to download & compile the source.

Download the latest version of pptp client source from official website

cd /pptp-1.9.0
make
cp pptp /usr/sbin

After these steps, VPN is connecting.

1
  • If the Ubuntu package does not work due to a version mismatch, please file a bug report so it can be fixed. Ubuntu is only as good as we volunteers make it.
    – user535733
    Oct 26, 2017 at 13:10
0

We were getting this error (The VPN connection 'MY-VPN' failed because the VPN service stopped unexpectedly) because we allowed ufw. like

sudo ufw allow 1433

Once we disabled ufw using the following command, the VPN connected successfully again.

sudo ufw disable

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .