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
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:
The root cause was that 2 required netfilter kernel modules are not loaded during boot:
Solution: load the nf_conntrack_pptp module, the latter is its dependency and will be loaded automatically.
References:
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.
I use Ubuntu 12.04, and setup VPN from GUI
For the majority of distributions you must load the
nf_conntrack_pptp
andnf_conntrack_proto_gre
kernel modules for certain PPTP/VPN servers. This can be done with:(
nf_conntrack_proto_gre
is loaded automatically as a dependency ofnf_conntrack_pptp
)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:
If this port is not blocked I recommend to check firewall settings on computer and router(some routers have pptp/gre passthrough option)
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:And after that a failure message
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:
then I tried to reconnect PPTP VPN and it worked.
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
After these steps, VPN is connecting.
We were getting this error (The VPN connection 'MY-VPN' failed because the VPN service stopped unexpectedly) because we allowed ufw. like
Once we disabled ufw using the following command, the VPN connected successfully again.