Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: VPN connection won't stay alive

  1. #1
    Join Date
    May 2006
    Location
    Paris
    Beans
    87
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Cool VPN connection won't stay alive

    Hi all,

    As part of my transition moving away from Windows altogether, I've been trying to get the VPN to work properly under Ubuntu 10.10 32bit, through the wifi connection. The provider is Ivacy, using PPTP, and the usual instructions (below) are followed:

    http://ivacy.com/en/doc/user/setup/linux

    The VPN originally connects fine, browsing etc works all fine, for a limited period of time though. Within roughly 10min the connection stops working; I'm not yet sure whether the determining factor is time or bandwidth, but it remains short-lived... There is no indication of the VPN connection dropping, it seems to remain connected, but no packets are received. To get the internet working again I have to manually disconnect from the VPN; then I can browse without the VPN, or reconnect the VPN and it will work for another small lapse of time.

    In addition, I'm not sure if this related, but after reconnecting a few times to the VPN as described above, eventually I get an error message, "failed to start the VPN service" (or words to that effect).

    The VPN connection worked very reliably under Windows; I would love to get this working as well with Ubuntu. Any advice on how to fix this would be much appreciated!

    Thank you in advance.

  2. #2
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    8,142
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: VPN connection won't stay alive

    After you have connected, try this. First, ascertain the IP address of the other end of your VPN connection. Open a terminal and enter "ifconfig". You should see an entry for the VPN that lists the IP of the other end. Once you know that IP, enter this in a terminal:

    Code:
    ping -i 30 -c 999999999 ip.of.remote.vpn &
    That will ping the IP address every thirty seconds. (The ampersand puts the process into the background.) It may just be that the connection times out when it's been idle for a while.

    There may be some options in the Linux PPTP client that will help maintain the connection as well.
    Last edited by SeijiSensei; February 22nd, 2011 at 02:44 PM.

  3. #3
    Join Date
    May 2006
    Location
    Paris
    Beans
    87
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: VPN connection won't stay alive

    Thanks, I'll give that a go, although I fear it won't change much - I've already made sure the connection wasn't left to idle, with downloads running, IMs running; I assume that also would have done the trick?

    I also tried ticking the "send PPP echo packets" option in the advanced settings, but to no avail, would that have done the same thing?

  4. #4
    Join Date
    May 2006
    Location
    Paris
    Beans
    87
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: VPN connection won't stay alive

    OK, so I tried this, without the ampersand to keep an eye on things. After a while my downloads all came to a halt, I could not longer browse any Internet page, but the VPN was allegedly still connected, and the ping kept returning normal values... I have to manually disconnect and reconnect each time this happens.

    What could be the cause? Any ideas how to get around this?

    Thanks!


    Quote Originally Posted by SeijiSensei View Post
    After you have connected, try this. First, ascertain the IP address of the other end of your VPN connection. Open a terminal and enter "ifconfig". You should see an entry for the VPN that lists the IP of the other end. Once you know that IP, enter this in a terminal:

    Code:
    ping -i 30 -c 999999999 ip.of.remote.vpn &
    That will ping the IP address every thirty seconds. (The ampersand puts the process into the background.) It may just be that the connection times out when it's been idle for a while.

    There may be some options in the Linux PPTP client that will help maintain the connection as well.

  5. #5
    Join Date
    May 2006
    Location
    Paris
    Beans
    87
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: VPN connection won't stay alive

    Sadly my connection is getting worse and worse. I have to connect many times now, before the internet works, most times I connect I receive no packets; I have to manually disconnect and reconnect, hoping for the best...

    Worse still, even without the VPN, the internet connection is getting slower and slower, it is becoming so poor I have had to reinstall windows as a dual boot (shame on me, I know). Sad to say the internet works impeccably under windows, using the same router and wifi card, whilst in Ubuntu I am really struggling to get something reliable...

    The wifi card is a D-link with Realtek RTL8168C chipset.

    Any help would be greatly appreciated...

  6. #6
    Join Date
    Dec 2006
    Location
    Atlanta, Georgia
    Beans
    131
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: VPN connection won't stay alive

    I'm sorry to necro this thread, but I'm experiencing the _exact_ same issue with Ubuntu 11.04. I'd love to see some activity on this thread. I'm not on wireless and I have kept this vpn connection alive on the same machine for days on end with Windows7.

    Why is it that the more I use Ubuntu the more I appreciate how Windows7 "just works"? Why do I have to deal with stuff like this with an operating system that is supposed to be as strong or stronger than Windows in the Desktop PC market? Sorry, I'm venting and ranting. I really just want to know how to keep my VPN alive more than 10 minutes at a time.

    Surely the OP and I can't be the only ones experiencing this issue.
    Last edited by frotzed; September 29th, 2011 at 01:41 AM.
    The 800lb penguin in the room

  7. #7
    Join Date
    Dec 2006
    Location
    Atlanta, Georgia
    Beans
    131
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: VPN connection won't stay alive

    As an update I've used the hack above to, after connecting to the VPN, run this code in a terminal window:

    Code:
    ping -i 30 -c 999999999 ip.of.remote.vpn &
    It does seem to be keeping the VPN alive which makes me happy

    However, I need a permanent solution to this issue. Maybe create a script that will execute upon establishing the VPN. Any ideas?


    I spoke too soon. The connection still died even with an active ping.
    Last edited by frotzed; September 29th, 2011 at 02:55 AM.
    The 800lb penguin in the room

  8. #8
    Join Date
    Dec 2006
    Location
    Atlanta, Georgia
    Beans
    131
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: VPN connection won't stay alive

    I should add that I'm using PPTP. Does Ubuntu just not play nice with this?
    The 800lb penguin in the room

  9. #9
    Join Date
    Jul 2009
    Beans
    22

    Re: VPN connection won't stay alive

    I am experiencing the exact same problem using Ubuntu 11.04 (wired connection). I have setup a PPTP VPN connection via the network manager, following my VPN provider's instructions to the letter:

    1. input the IP address of the target computer.
    2. input your user name. Leave all else blank.
    3. hit Advanced button.
    4. check: MSCHAPv2
    5. check: Use Point-to-point encryption (MPPE)
    6. select: 128-bit
    7. check: Allow stateful encryption
    8. check: Allow PPP echo packets
    9. Leave all else blank. Hit OK, OK to save and get out.

    I am disconnected at seemingly random periods of time after connecting. Sometimes the connection might stay open for 2 hours, but most of the time I am disconnected within 5 minutes. Once disconnected, the network manager shows that I am still connected. I have to select VPN CONNECTIONS > DISCONNECT VPN, and then connect again.

    I have written to the systems administrator who replied with:

    "According to our debug log the disconnections are caused by malformed GRE packets. We have a lot of bad checksums on your connection."

    I can stay connected for indefinitely when using Mac OS (Lion) or Windows 7, so I very much doubt it's my hardware or my ISP.

    I'm guessing that there aren't that many Ubuntu Desktop users out there who use a PPTP VPN connections, hence this problem is either not confirmed and very low on the priority list. Unfortunately for me, the problem is so annoying that I can't use Ubuntu (a reliable VPN connection is essential for me).

    Update: this is what is reported in my /var/log/syslog after the disconnection occurs:

    Code:
    Oct 10 05:44:27 iMac-Ubuntu pptp[11871]: nm-pptp-service-11745 log[pptp_read_some:pptp_ctrl.c:544]: read returned zero, peer has closed
    Oct 10 05:44:27 iMac-Ubuntu pptp[11871]: nm-pptp-service-11745 log[callmgr_main:pptp_callmgr.c:258]: Closing connection (shutdown)
    Oct 10 05:44:27 iMac-Ubuntu pptp[11871]: nm-pptp-service-11745 log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 12 'Call-Clear-Request'
    Oct 10 05:44:27 iMac-Ubuntu pptp[11871]: nm-pptp-service-11745 log[pptp_read_some:pptp_ctrl.c:544]: read returned zero, peer has closed
    Oct 10 05:44:27 iMac-Ubuntu pptp[11871]: nm-pptp-service-11745 log[call_callback:pptp_callmgr.c:79]: Closing connection (call state)
    Oct 10 05:44:27 iMac-Ubuntu pppd[11861]: Modem hangup
    Oct 10 05:44:27 iMac-Ubuntu pppd[11861]: Connect time 22.6 minutes.
    Oct 10 05:44:27 iMac-Ubuntu pppd[11861]: Sent 36219320 bytes, received 1371467319 bytes.
    Oct 10 05:44:27 iMac-Ubuntu pppd[11861]: MPPE disabled
    Oct 10 05:44:27 iMac-Ubuntu pppd[11861]: Connection terminated.
    Oct 10 05:44:27 iMac-Ubuntu NetworkManager[806]: <info> VPN plugin state changed: 5
    Oct 10 05:44:27 iMac-Ubuntu NetworkManager[806]: <info> VPN plugin state changed: 6
    Oct 10 05:44:27 iMac-Ubuntu NetworkManager[806]: <info> VPN plugin state change reason: 0
    Oct 10 05:44:27 iMac-Ubuntu NetworkManager[806]: <warn> error disconnecting VPN: Could not process the request because no VPN connection was active.
    Oct 10 05:44:27 iMac-Ubuntu pppd[11861]: Terminating on signal 15
    Oct 10 05:44:27 iMac-Ubuntu pppd[11861]: Exit.
    Oct 10 05:44:28 iMac-Ubuntu NetworkManager[806]: <info> Policy set 'Auto eth0' (eth0) as default for IPv4 routing and DNS.
    Oct 10 05:44:28 iMac-Ubuntu NetworkManager[806]:    SCPlugin-Ifupdown: devices removed (path: /sys/devices/virtual/net/ppp0, iface: ppp0)
    Oct 10 05:44:33 iMac-Ubuntu NetworkManager[806]: <info> VPN service 'pptp' disappeared
    Last edited by Scott Deagan; October 10th, 2011 at 05:48 AM.

  10. #10
    Join Date
    Dec 2006
    Location
    Atlanta, Georgia
    Beans
    131
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: VPN connection won't stay alive

    Mine is 11.04 wired connection as well. I'm wondering if this is an issue with the driver for this NIC. I have 11.04 installed on my laptop and connected it to the same VPN from the same network (albeit wireless) and it didn't have any issues at all... VPN stayed alive all night.
    Last edited by frotzed; October 11th, 2011 at 03:54 AM.
    The 800lb penguin in the room

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •