VPN Connects Successfully & Then Shortly Thereafter Fails

Bug #991666 reported by Marcus Hayhurst
90
This bug affects 17 people
Affects Status Importance Assigned to Milestone
network-manager-pptp
New
Undecided
Unassigned
network-manager (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I am able to successfully establish a PPTP VPN connection in Ubuntu 12.04 (kernel 3.2.0-24-generic) but after approximately 30 seconds to 1.5 minutes it will fail. During the connection time I am only able to load about 1-2 webpages and then they freeze and I cannot access resources on the VPN network. I do not believe this is related to my VPN server as I am able to establish VPN connections with my Windows machines and Smartphones all day long with no problems. Is there a solution to this problem?

Description: Ubuntu 12.04 LTS
Release: 12.04

network-manager: 0.9.4.0-0ubuntu3

Here is the syslog:

Apr 30 00:17:50 satellite-p755 NetworkManager[994]: <info> Starting VPN service 'pptp'...
Apr 30 00:17:50 satellite-p755 NetworkManager[994]: <info> VPN service 'pptp' started (org.freedesktop.NetworkManager.pptp), PID 15069
Apr 30 00:17:50 satellite-p755 NetworkManager[994]: <info> VPN service 'pptp' appeared; activating connections
Apr 30 00:17:50 satellite-p755 NetworkManager[994]: <info> VPN plugin state changed: starting (3)
Apr 30 00:17:51 satellite-p755 NetworkManager[994]: <info> VPN connection 'Schaefer Law Group' (Connect) reply received.
Apr 30 00:17:51 satellite-p755 pppd[15073]: Plugin /usr/lib/pppd/2.4.5/nm-pptp-pppd-plugin.so loaded.
Apr 30 00:17:51 satellite-p755 pppd[15073]: pppd 2.4.5 started by root, uid 0
Apr 30 00:17:51 satellite-p755 pppd[15073]: Using interface ppp0
Apr 30 00:17:51 satellite-p755 pppd[15073]: Connect: ppp0 <--> /dev/pts/2
Apr 30 00:17:51 satellite-p755 NetworkManager[994]: SCPlugin-Ifupdown: devices added (path: /sys/devices/virtual/net/ppp0, iface: ppp0)
Apr 30 00:17:51 satellite-p755 NetworkManager[994]: SCPlugin-Ifupdown: device added (path: /sys/devices/virtual/net/ppp0, iface: ppp0): no ifupdown configuration found.
Apr 30 00:17:51 satellite-p755 pptp[15076]: nm-pptp-service-15069 log[main:pptp.c:314]: The synchronous pptp option is NOT activated
Apr 30 00:17:51 satellite-p755 pptp[15084]: nm-pptp-service-15069 log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 1 'Start-Control-Connection-Request'
Apr 30 00:17:51 satellite-p755 pptp[15084]: nm-pptp-service-15069 log[ctrlp_disp:pptp_ctrl.c:739]: Received Start Control Connection Reply
Apr 30 00:17:51 satellite-p755 pptp[15084]: nm-pptp-service-15069 log[ctrlp_disp:pptp_ctrl.c:773]: Client connection established.
Apr 30 00:17:52 satellite-p755 pptp[15084]: nm-pptp-service-15069 log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 7 'Outgoing-Call-Request'
Apr 30 00:17:52 satellite-p755 pptp[15084]: nm-pptp-service-15069 log[ctrlp_disp:pptp_ctrl.c:858]: Received Outgoing Call Reply.
Apr 30 00:17:52 satellite-p755 pptp[15084]: nm-pptp-service-15069 log[ctrlp_disp:pptp_ctrl.c:897]: Outgoing call established (call ID 0, peer's call ID 0).
Apr 30 00:17:55 satellite-p755 pppd[15073]: CHAP authentication succeeded
Apr 30 00:17:55 satellite-p755 pppd[15073]: MPPE 128-bit stateless compression enabled
Apr 30 00:17:55 satellite-p755 pppd[15073]: local IP address 192.168.1.20
Apr 30 00:17:55 satellite-p755 pppd[15073]: remote IP address 192.168.1.1
Apr 30 00:17:55 satellite-p755 pppd[15073]: primary DNS address 8.8.8.8
Apr 30 00:17:55 satellite-p755 pppd[15073]: secondary DNS address 8.8.4.4
Apr 30 00:17:55 satellite-p755 NetworkManager[994]: <info> VPN connection 'Schaefer Law Group' (IP Config Get) reply received.
Apr 30 00:17:55 satellite-p755 NetworkManager[994]: <info> VPN Gateway: 75.75.79.330
Apr 30 00:17:55 satellite-p755 NetworkManager[994]: <info> Tunnel Device: ppp0
Apr 30 00:17:55 satellite-p755 NetworkManager[994]: <info> Internal IP4 Address: 192.168.1.20
Apr 30 00:17:55 satellite-p755 NetworkManager[994]: <info> Internal IP4 Prefix: 32
Apr 30 00:17:55 satellite-p755 NetworkManager[994]: <info> Internal IP4 Point-to-Point Address: 192.168.1.1
Apr 30 00:17:55 satellite-p755 NetworkManager[994]: <info> Maximum Segment Size (MSS): 0
Apr 30 00:17:55 satellite-p755 NetworkManager[994]: <info> Forbid Default Route: no
Apr 30 00:17:55 satellite-p755 NetworkManager[994]: <info> Internal IP4 DNS: 8.8.8.8
Apr 30 00:17:55 satellite-p755 NetworkManager[994]: <info> Internal IP4 DNS: 8.8.4.4
Apr 30 00:17:55 satellite-p755 NetworkManager[994]: <info> DNS Domain: '(none)'
Apr 30 00:17:56 satellite-p755 dnsmasq[14712]: exiting on receipt of SIGTERM
Apr 30 00:17:56 satellite-p755 NetworkManager[994]: <info> DNS: starting dnsmasq...
Apr 30 00:17:56 satellite-p755 NetworkManager[994]: <info> (ppp0): writing resolv.conf to /sbin/resolvconf
Apr 30 00:17:56 satellite-p755 dnsmasq[15128]: started, version 2.59 cache disabled
Apr 30 00:17:56 satellite-p755 dnsmasq[15128]: compile time options: IPv6 GNU-getopt DBus i18n DHCP TFTP conntrack IDN
Apr 30 00:17:56 satellite-p755 dnsmasq[15128]: using nameserver 8.8.4.4#53
Apr 30 00:17:56 satellite-p755 dnsmasq[15128]: using nameserver 8.8.8.8#53
Apr 30 00:17:56 satellite-p755 NetworkManager[994]: <info> VPN connection 'Schaefer Law Group' (IP Config Get) complete.
Apr 30 00:17:56 satellite-p755 NetworkManager[994]: <info> Policy set 'Schaefer Law Group' (ppp0) as default for IPv4 routing and DNS.
Apr 30 00:17:56 satellite-p755 NetworkManager[994]: <info> VPN plugin state changed: started (4)
Apr 30 00:17:56 satellite-p755 dbus[890]: [system] Activating service name='org.freedesktop.nm_dispatcher' (using servicehelper)
Apr 30 00:17:56 satellite-p755 dbus[890]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Apr 30 00:18:04 satellite-p755 ntpdate[15161]: adjust time server 91.189.94.4 offset 0.053823 sec
Apr 30 00:19:52 satellite-p755 pptp[15084]: nm-pptp-service-15069 log[pptp_handle_timer:pptp_ctrl.c:1050]: closing control connection due to missing echo reply
Apr 30 00:19:52 satellite-p755 pptp[15084]: nm-pptp-service-15069 log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 12 'Call-Clear-Request'
Apr 30 00:19:52 satellite-p755 pptp[15084]: nm-pptp-service-15069 log[pptp_conn_close:pptp_ctrl.c:430]: Closing PPTP connection
Apr 30 00:19:52 satellite-p755 pptp[15084]: nm-pptp-service-15069 log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 3 'Stop-Control-Connection-Request'
Apr 30 00:19:52 satellite-p755 pptp[15084]: nm-pptp-service-15069 log[call_callback:pptp_callmgr.c:79]: Closing connection (call state)
Apr 30 00:19:52 satellite-p755 pppd[15073]: Modem hangup
Apr 30 00:19:52 satellite-p755 pppd[15073]: Connect time 2.0 minutes.
Apr 30 00:19:52 satellite-p755 pppd[15073]: Sent 5296 bytes, received 1195 bytes.
Apr 30 00:19:52 satellite-p755 pppd[15073]: MPPE disabled
Apr 30 00:19:52 satellite-p755 pppd[15073]: Connection terminated.
Apr 30 00:19:52 satellite-p755 avahi-daemon[950]: Withdrawing workstation service for ppp0.
Apr 30 00:19:52 satellite-p755 NetworkManager[994]: <info> VPN plugin state changed: stopping (5)
Apr 30 00:19:52 satellite-p755 NetworkManager[994]: <info> VPN plugin state changed: stopped (6)
Apr 30 00:19:52 satellite-p755 NetworkManager[994]: <info> VPN plugin state change reason: 0
Apr 30 00:19:52 satellite-p755 NetworkManager[994]: <warn> error disconnecting VPN: Could not process the request because no VPN connection was active.
Apr 30 00:19:52 satellite-p755 NetworkManager[994]: <warn> (9) failed to find interface name for index
Apr 30 00:19:52 satellite-p755 NetworkManager[994]: nm_system_iface_flush_routes: assertion `iface != NULL' failed
Apr 30 00:19:52 satellite-p755 NetworkManager[994]: <warn> (9) failed to find interface name for index
Apr 30 00:19:52 satellite-p755 dnsmasq[15128]: exiting on receipt of SIGTERM
Apr 30 00:19:52 satellite-p755 NetworkManager[994]: <info> DNS: starting dnsmasq...
Apr 30 00:19:52 satellite-p755 NetworkManager[994]: <info> (ppp0): writing resolv.conf to /sbin/resolvconf
Apr 30 00:19:52 satellite-p755 dnsmasq[15196]: started, version 2.59 cache disabled
Apr 30 00:19:52 satellite-p755 dnsmasq[15196]: compile time options: IPv6 GNU-getopt DBus i18n DHCP TFTP conntrack IDN
Apr 30 00:19:52 satellite-p755 dnsmasq[15196]: using nameserver 192.168.1.1#53
Apr 30 00:19:53 satellite-p755 NetworkManager[994]: <info> Policy set 'dd-wrt' (wlan0) as default for IPv4 routing and DNS.
Apr 30 00:19:53 satellite-p755 NetworkManager[994]: SCPlugin-Ifupdown: devices removed (path: /sys/devices/virtual/net/ppp0, iface: ppp0)
Apr 30 00:19:53 satellite-p755 dbus[890]: [system] Activating service name='org.freedesktop.nm_dispatcher' (using servicehelper)
Apr 30 00:19:53 satellite-p755 dbus[890]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Apr 30 00:19:53 satellite-p755 pppd[15073]: Exit.
Apr 30 00:19:58 satellite-p755 NetworkManager[994]: <info> VPN service 'pptp' disappeared
Apr 30 00:21:01 satellite-p755 dbus[890]: [system] Activating service name='org.gnome.SettingsDaemon.DateTimeMechanism' (using servicehelper)
Apr 30 00:21:01 satellite-p755 dbus[890]: [system] Successfully activated service 'org.gnome.SettingsDaemon.DateTimeMechanism'
Apr 30 00:21:36 satellite-p755 dbus[890]: [system] Activating service name='org.gnome.SettingsDaemon.DateTimeMechanism' (using servicehelper)

Revision history for this message
stefano.marzorati (stefano-marzorati) wrote :

Same problem:
Sat May 12 14:04:12 2012 us=362468 /sbin/route add -net 10.254.254.1 netmask 255.255.255.255 gw 10.254.254.5
Sat May 12 14:04:12 2012 us=366725 Initialization Sequence Completed
Sat May 12 14:04:12 2012 us=367158 Connection reset, restarting [0]
Sat May 12 14:04:12 2012 us=368262 TCP/UDP: Closing socket
Sat May 12 14:04:12 2012 us=368399 /sbin/route del -net 10.254.254.1 netmask 255.255.255.255
Sat May 12 14:04:12 2012 us=372915 /sbin/route del -net 192.168.108.0 netmask 255.255.252.0
Sat May 12 14:04:12 2012 us=377120 /sbin/route del -net 192.168.100.0 netmask 255.255.252.0
Sat May 12 14:04:12 2012 us=381242 Closing TUN/TAP interface
Sat May 12 14:04:12 2012 us=381344 /sbin/ifconfig tun0 0.0.0.0
Sat May 12 14:04:12 2012 us=407799 /etc/openvpn/update-resolv-conf tun0 1500 1544 10.254.254.6 10.254.254.5 init
Sat May 12 14:04:12 2012 us=563450 SIGUSR1[soft,connection-reset] received, process restarting
Sat May 12 14:04:12 2012 us=563561 Restart pause, 5 second(s)

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in network-manager-applet (Ubuntu):
status: New → Confirmed
Revision history for this message
Scott Deagan (scott-deagan) wrote :

This is a problem that I have experienced since Ubuntu 11.04 (I don't think I used a VPN with 10.10, can't remember). I posted here (post #9) in September 2011: http://ubuntuforums.org/showthread.php?t=1692353

I'm having the exact same problem with Ubuntu 12.04 - I can connect, the connection will stay up and work for a while, then it will disconnect at a seemingly random period (usually within a 10 minute timeframe).

I'm having to use Windows 7 on the same computer (dual boot) to establish reliable PPTP VPN connections that stay up. This is one of the main reasons I can't ditch Windows completely.

Revision history for this message
Scott Deagan (scott-deagan) wrote :

I believe I have found what was casuing the problem in my case. I have a Realtek R8168 onboard ethernet, but Ubuntu was loading the Realtek R8169 driver.

lspci | grep -i eth output:

01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 06)

I followed the instructions here to download and install the proprietary Realtek 8168 drivers:

http://amk1.wordpress.com/2009/06/09/realtek-8168-module-issue/

It's still too soon to know for sure, but so far my VPN connection has been up for over 2 hours (longest it has ever been up without dropping).

Revision history for this message
Scott Deagan (scott-deagan) wrote :

Sorry, looks like I spoke too soon (post #4). The disconnections are still occuring even though I have replaced the R8169 with the R8168 module. I'm now testing with a WiFi dongle, will see how solid/stable my PPTP connection is using different networking equipment.

Revision history for this message
Scott Deagan (scott-deagan) wrote :

I've been using the Wifi connect now for 16 hours:

Bus 001 Device 002: ID 148f:3072 Ralink Technology, Corp. RT3072 Wireless Adapter

The PPTP VPN connection has stayed up for the entire time - not one single disconnect. The only problem is the RT3072 is incredibly slow compared to my wired connection. Still, I prefer reliability over throughput.

Anyway, maybe this issue is related to the connection speed? Just a wild stab in the dark...

Thomas Hood (jdthood)
affects: network-manager-applet (Ubuntu) → network-manager (Ubuntu)
affects: network-manager-applet → network-manager-pptp
Revision history for this message
Antti P Miettinen (apm) wrote :

For me the issue occurs with Juniper SSL VPN. Apparently network manager adds the original default route, I'd guess upon DHCP renew, which overrides the default route that should go to my VPN tunnel (from /var/log/syslog):

NetworkManager[xxx]: <info> Policy set 'xxx' (wlan0) as default for IPv4 routing and DNS.

The network-manager-vpnc package seems to integrate with network-manager in a way that prevents network manager from doing this as with VPNC to a cisco concentrator, the issue does not occur:

NetworkManager[yyy]: <info> Policy set 'yyy' (tun0) as default for IPv4 routing and DNS.

What would be required to achieve the same with Juniper SSL VPN? Is there a way to prevent NM from doing these policy updates?

Revision history for this message
Alexander Radzishevsky (radzish) wrote :

I am having similar issue, please see here:
http://ubuntuforums.org/showthread.php?p=12482777#post12482777

Revision history for this message
Antti P Miettinen (apm) wrote :

My current disgusting workaround:

--- network-manager-0.9.4.0.orig/src/nm-policy.c
+++ network-manager-0.9.4.0/src/nm-policy.c
@@ -19,6 +19,9 @@
  * Copyright (C) 2007 - 2008 Novell, Inc.
  */

+#include <sys/types.h>
+#include <sys/stat.h>
+
 #include <config.h>
 #include <string.h>
 #include <unistd.h>
@@ -447,6 +450,10 @@ update_ip4_routing_and_dns (NMPolicy *po
  NMSettingConnection *s_con = NULL;
  const char *connection_id;
  int ip_ifindex = 0;
+ struct stat sb;
+
+ if (stat("/run/nm-policy-block-ip4-updates", &sb) == 0)
+ return;

  best = get_best_ip4_device (policy->manager, &best_req);
  if (!best)

which allows me to touch or rm /run/nm-policy-block-ip4-updates upon VPN establish/teardown.

Revision history for this message
Artyom Kazak (artyom-kazak) wrote :

Happens to me with two different providers. Sometimes it’s “closing control connection due to missing echo reply”, sometimes it’s different (irrelevant parts skipped):

Feb 10 16:24:06 artyom-1215N NetworkManager[1036]: <info> Starting VPN service 'pptp'...

Feb 10 16:24:10 artyom-1215N NetworkManager[1036]: <info> VPN connection 'ADSL.BY' (IP Config Get) complete.
Feb 10 16:24:10 artyom-1215N NetworkManager[1036]: <info> Policy set 'ADSL.BY' (ppp0) as default for IPv4 routing and DNS.
Feb 10 16:24:10 artyom-1215N NetworkManager[1036]: <info> ((null)): writing resolv.conf to /sbin/resolvconf
Feb 10 16:24:10 artyom-1215N dnsmasq[1969]: setting upstream servers from DBus
Feb 10 16:24:10 artyom-1215N dnsmasq[1969]: using nameserver 81.25.32.99#53
Feb 10 16:24:10 artyom-1215N dnsmasq[1969]: using nameserver 81.25.32.34#53
Feb 10 16:24:10 artyom-1215N dnsmasq[1969]: using nameserver 81.25.32.9#53
Feb 10 16:24:10 artyom-1215N NetworkManager[1036]: <info> VPN plugin state changed: started (4)
Feb 10 16:24:10 artyom-1215N dbus[941]: [system] Activating service name='org.freedesktop.nm_dispatcher' (using servicehelper)
Feb 10 16:24:11 artyom-1215N dbus[941]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Feb 10 16:24:29 artyom-1215N ntpdate[31288]: no server suitable for synchronization found
Feb 10 16:24:41 artyom-1215N pptp[31230]: nm-pptp-service-31208 log[pptp_read_some:pptp_ctrl.c:544]: read returned zero, peer has closed
Feb 10 16:24:41 artyom-1215N pptp[31230]: nm-pptp-service-31208 log[callmgr_main:pptp_callmgr.c:258]: Closing connection (shutdown)
Feb 10 16:24:41 artyom-1215N pptp[31230]: nm-pptp-service-31208 log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 12 'Call-Clear-Request'
Feb 10 16:24:41 artyom-1215N pptp[31230]: nm-pptp-service-31208 log[pptp_read_some:pptp_ctrl.c:544]: read returned zero, peer has closed
Feb 10 16:24:41 artyom-1215N pptp[31230]: nm-pptp-service-31208 log[call_callback:pptp_callmgr.c:79]: Closing connection (call state)
Feb 10 16:24:41 artyom-1215N pppd[31213]: Modem hangup
Feb 10 16:24:41 artyom-1215N pppd[31213]: Connect time 0.6 minutes.
Feb 10 16:24:41 artyom-1215N pppd[31213]: Sent 10384 bytes, received 0 bytes.
Feb 10 16:24:41 artyom-1215N pppd[31213]: Connection terminated.

Revision history for this message
Artyom Kazak (artyom-kazak) wrote :

Weird. It has stopped disconnecting once I moved custom routes from VPN connection to Wi-Fi connection settings.

Revision history for this message
Behrooz Amoozad (behrooz0az) wrote : Re: [Bug 991666] Re: VPN Connects Successfully & Then Shortly Thereafter Fails
Download full text (9.8 KiB)

Artyom Kazak <email address hidden> wrote:

>Weird. It has stopped disconnecting once I moved custom routes from VPN
>connection to Wi-Fi connection settings.
>
>--
>You received this bug notification because you are subscribed to the bug
>report.
>https://bugs.launchpad.net/bugs/991666
>
>Title:
> VPN Connects Successfully & Then Shortly Thereafter Fails
>
>Status in NetworkManager-PPTP:
> New
>Status in “network-manager” package in Ubuntu:
> Confirmed
>
>Bug description:
> I am able to successfully establish a PPTP VPN connection in Ubuntu
> 12.04 (kernel 3.2.0-24-generic) but after approximately 30 seconds to
> 1.5 minutes it will fail. During the connection time I am only able
> to load about 1-2 webpages and then they freeze and I cannot access
> resources on the VPN network. I do not believe this is related to my
> VPN server as I am able to establish VPN connections with my Windows
> machines and Smartphones all day long with no problems. Is there a
> solution to this problem?
>
> Description: Ubuntu 12.04 LTS
> Release: 12.04
>
> network-manager: 0.9.4.0-0ubuntu3
>
> Here is the syslog:
>
> Apr 30 00:17:50 satellite-p755 NetworkManager[994]: <info> Starting VPN service 'pptp'...
> Apr 30 00:17:50 satellite-p755 NetworkManager[994]: <info> VPN service 'pptp' started (org.freedesktop.NetworkManager.pptp), PID 15069
> Apr 30 00:17:50 satellite-p755 NetworkManager[994]: <info> VPN service 'pptp' appeared; activating connections
> Apr 30 00:17:50 satellite-p755 NetworkManager[994]: <info> VPN plugin state changed: starting (3)
> Apr 30 00:17:51 satellite-p755 NetworkManager[994]: <info> VPN connection 'Schaefer Law Group' (Connect) reply received.
> Apr 30 00:17:51 satellite-p755 pppd[15073]: Plugin /usr/lib/pppd/2.4.5/nm-pptp-pppd-plugin.so loaded.
> Apr 30 00:17:51 satellite-p755 pppd[15073]: pppd 2.4.5 started by root, uid 0
> Apr 30 00:17:51 satellite-p755 pppd[15073]: Using interface ppp0
> Apr 30 00:17:51 satellite-p755 pppd[15073]: Connect: ppp0 <--> /dev/pts/2
> Apr 30 00:17:51 satellite-p755 NetworkManager[994]: SCPlugin-Ifupdown: devices added (path: /sys/devices/virtual/net/ppp0, iface: ppp0)
> Apr 30 00:17:51 satellite-p755 NetworkManager[994]: SCPlugin-Ifupdown: device added (path: /sys/devices/virtual/net/ppp0, iface: ppp0): no ifupdown configuration found.
> Apr 30 00:17:51 satellite-p755 pptp[15076]: nm-pptp-service-15069 log[main:pptp.c:314]: The synchronous pptp option is NOT activated
> Apr 30 00:17:51 satellite-p755 pptp[15084]: nm-pptp-service-15069 log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 1 'Start-Control-Connection-Request'
> Apr 30 00:17:51 satellite-p755 pptp[15084]: nm-pptp-service-15069 log[ctrlp_disp:pptp_ctrl.c:739]: Received Start Control Connection Reply
> Apr 30 00:17:51 satellite-p755 pptp[15084]: nm-pptp-service-15069 log[ctrlp_disp:pptp_ctrl.c:773]: Client connection established.
> Apr 30 00:17:52 satellite-p755 pptp[15084]: nm-pptp-service-15069 log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 7 'Outgoing-Call-Request'
> Apr 30 00:17:52 satellite-p755 pptp[15084]: nm-pptp-service-15069 log[ctrlp_disp:pptp_ctrl.c:858]: Received Ou...

Read more...

Revision history for this message
JC (joostw) wrote :

Hi everybody,

I have the exact same symptoms on 14.04 with a PPTP VPN.

I have a very strong feeling this is related to custom routes. I can initiate the VPN and have it working (had it up for at least 15min without problems), but as soon as I add a custom route on the command line the connection drops after a couple of seconds. Also, when entered in the VPN/Settings gui, the connection drops shortly (seconds) after intiation.
Is there some conflicting process which stumbles over the custom route? Perhaps dhclient or pptp itself?

So, for now, VPN is unusable to me as I need a custom route. Bummer.

Revision history for this message
Danas (danas) wrote :

Hi all,

I've experienced a very simmilar issue on 14.04 as well. The reason of my case actually was in routing table, in particular - routes pushed by VPN server. Those routes were wrong or interpreted incorrectly and some kind of packet collision was happening shortly after connecting VPN. More details described in my post - http://tdanas.blogspot.com/2015/01/ubuntu-vpn-connects-successfully-and.html

Regards,
Danas

Revision history for this message
Wellington Torrejais da Silva (wellington1993) wrote :

I have similar problem on Ubuntu 14.10 too.

Revision history for this message
Alex Botev (botevmg) wrote :

On 14.04 experiencing the same problem. After I try to connect to my VPN in a matter of a few seconds after the successful connection I get disconnected. Following this post http://tdanas.blogspot.co.uk/2015/01/ubuntu-vpn-connects-successfully-and.html I decide to see what are my routing tables while the connection is on. Results are:

Destination Gateway Genmask Flags Metric Ref Use Iface
default * 0.0.0.0 U 0 0 0 ppp0
cyrano2.cs.ucl. 172.17.31.1 255.255.255.255 UGH 0 0 0 wlan0
cyrano2.cs.ucl. 172.17.31.1 255.255.255.255 UGH 0 0 0 wlan0
winvpn11.cs.ucl * 255.255.255.255 UH 0 0 0 ppp0
172.17.31.0 * 255.255.255.0 U 9 0 0 wlan0

I do not know how it works but having a duplicate entry in the routing table might be the cause of the problem.

Revision history for this message
Avankey (avankey) wrote :

I had two problem with my pptp vpn connection on ubuntu 14.04 with 3.19 Kernel.

first it wont connect at all and i solved that with this command:

sudo modprobe nf_conntrack_pptp nf_conntrack_proto_gre

second my vpn connection gets disconnected after a few second (usually with first packets transmit) and i solved that with my vpn setting's on network manager:
IPv4 Setting tab -> Routers -> checked both check boxes there.

Revision history for this message
Angeliki (angelikibaz) wrote :

I have the same issue in Ubuntu 14.04 when using Juniper VPN...

Revision history for this message
Masoud Kazemi (mkazemi73) wrote :

I have exactly the same problem on Ubuntu 16.04. I have created a vpn connection and it disconnects after almost 5 minutes. One weird thing is that the laptop fan starts working with a high speed and exactly at the same moment the vpn disconnects.

Revision history for this message
radioheaded (maxxarts) wrote :

I've had the same problem for about a year, and now, I think, I've finally found the way to fix it (at least somehow).

Looks like in my case it was the same as in https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/991666/comments/16 (duplicate routes entries).

So what I've done.

- run `sudo route -n` before connecting to VPN and after
- found entries that were pushed from the VPN server
- found duplicate entry
- manually added all but duplicate pushed entries to routes (Network connections -> your VPN connection -> IPv4 settings -> Routes -> Add ...) and checked "Ignore automatically obtained routes" checkbox.
- restarted VPN connection

Since that all works just fine.

Thanks to @botevmg!

Revision history for this message
Gopal (gopal-mv1984) wrote :

Hi All,

I have a good news to share, I could solve this problem after around a week. There are couple of points.
# I have this problem, only with my Home Wifi. It was working fine with office Wifi / Smartphone Hotspot.
# I could solve the problem by simply changing MTU value. Refer below article for the same.
https://www.privateinternetaccess.com/forum/discussion/17335/vpn-trouble-with-german-unitymedia-and-win-8-1

Revision history for this message
Jens Meiß (jens-meiss) wrote :

Hi,

had the same problem with a pptp vpn (don't ask why we use pptp). As described i had to set the MTU of the physical network adapter (e.g. eth0) to 1000 to get the VPN working without disconnectes all the time.

You can set the MTU easily via the network manager on the "ethernet" tab, but you have to restart the network stack before it gets activated (just diconnect and reconnect you normal network connection via network manager).

You can find the current value of the MTU with ifconfig ...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.