Ubuntu

VPN Connects Successfully & Then Shortly Thereafter Fails

Reported by Marcus Hayhurst on 2012-04-30
54
This bug affects 10 people
Affects Status Importance Assigned to Milestone
network-manager-pptp
New
Undecided
Unassigned
network-manager (Ubuntu)
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)

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)

Launchpad Janitor (janitor) wrote :

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

Changed in network-manager-applet (Ubuntu):
status: New → Confirmed
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.

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).

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.

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) on 2012-10-30
affects: network-manager-applet (Ubuntu) → network-manager (Ubuntu)
affects: network-manager-applet → network-manager-pptp
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?

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

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.

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.

Artyom Kazak (artyom-kazak) wrote :

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

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...

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

Other bug subscribers