solution for connection drops on linux with open vpn

I experienced the same connection drops many others have reported. F.i. when torrenting, after 2 minutes, the speed drops to zero, sometimes even the vpn kills itself alltogether.

Tried everything: port forwarding in the torrent client, switching of the firewall on my pc and in the router, setting the max connection to the torrent client to 5  -all to no avail. Finally, i found this solution

add the following line

net.ipv4.ip_forward = 1 
to the file
/etc/sysctl.conf 
I do not use the PIA client (wont run on open suse) but the default open VNP client instead. 
Works like a charm now (on opensuse Leap 42.2)!

Very interested if this works out for you ass well!


Comments

  • seems like a "i'll get the giraffe while you fill the bathtub with brightly colored screwdrivers" solution.

    what has forwarding packets between separate physical network interfaces like a network router got to do with the symptoms observed?
  • edited April 2017
    adding net.ipv4.ip_forward=1 to /etc/sysctl.conf is applicable only to setting up an OpenVPN server. It is not something you should be doing when setting up an OpenVPN client. Something else you did had an effect on what you were experiencing.

  • I am having the same issue and this solution did not work for me on Ubuntu 16.04 LTS
  • of course it did not work for you. it is not a solution! it's a red herring. do not leave the change in place.
  • My solution, after rolling back this change, was to re-run the exact same commands I ran many years ago when I first got PIA on an older version of Ubuntu LTS. It has worked fine through many Ubuntu upgrades until the last week or so. Re-running the same commands solved my problem

    https://www.privateinternetaccess.com/pages/client-support/ubuntu-openvpn

    I have had to create my own script to take the VPN down though, as disconnect VPN is now not in the Network Manager drop down list. The script contains this:
    nncli con down id "PIA - AU Sydney"

    Additionally there are now probably twice as many servers in the list as there used to be.
  • Same issues here. I've tested on OpenSuse 13.2 and 42.2. Also tested on Kali Linux 2017.1. Seeing the same VPN network drop after around 2 minutes of torrenting. My OpenSuse setups have worked for years.
  • edited May 2017
    same unsubstantiated claims, different forum thread.
  • edited May 2017
    @martouf - Come again? What do you mean by unsubstantiated? Any constructive suggestions?

    I have also confirmed this issue with a fresh install of Lubuntu 16.04.1 with a non-updated system. Which means that the issue is unlikely due to an bug with recent versions of openvpn. 

    I've also tried enabling debug mode with openvpn service and there is nothing in the logs. Connection just drops at around 2 minutes when torrenting over pia. My test case just torrents a linux distro ISO file. Amount of bandwidth cap on torrent download does not have an impact. When just downloading over http, no problems.
  • I just tried another vpn provider that uses openvpn on lubuntu 16.04.1 and it works just fine. No issues. The provider I tested was Hide IP VPN.
  • edited May 2017
    unsubstantiated: without evidence. no logs. no nothing. just an ad for a competitor. they pay you, right?

    problem has been solved by software updates in some cases (you must use the latest PIA provided files) and by configuration changes in other cases (the fine details have changed from prior years).
  • edited May 2017
    I am having the same problem. I've tried multiple linux distros. I am using the openvpn network manager gui plugin. Edit: now trying some of the other methods mentioned by martouf in other threads. 
  • @martouf - I've been a customer of PIA for many years and have brought dozens of people to use their service. Definitely not paid for or supporter of competitors. However, I am very concerned with this issue though and hope that the PIA team can help us find a solution.

    I will share further logs on the other thread I opened recently as they are requested.
  • edited May 2017
    the solution is to download the PIA-prepared ovpn files and make sure your system configuration reflects the PIA baseline configuration. that way you can be sure you are connecting to the correct port on the VPN server and are using the rest of the PIA-prescribed client parameters.
  • Hello martouf, tried all of the prepared ovpn files and I must say that the longest connection without failing was a little bit more than 12h, which is not too bad, but still, needs work. The only one working without disconnecting is an old version from 2015, basic 128, sha1.However tried it today and now it also disconnects fast. It seems like it depends what hours you test this just as much as what you are doing, like torrenting ( will disconnect you alot faster). I am following all suggestions and testing, because one day someone might get it right. But one thing is for sure PIA software does not work work with Debian 9.xx.
  • @vodka, would you mind posting your logs so that we can take a closer look at why the disconnections are happening?  

  • you do know that sustaining a connection depends on every piece of internet equipment at your ISP and all the ISPs in between your ISP and the PIA server not having a hiccup, right?
  • Hello Marfouf, yes, I know, but while I was using openVPN on Debian 9, compared to when I was using Debian Jessie 8.xx with PIA's app, using openvpn with Debian 9 the connections dropped frequently. However today I installed the latest PIA Linux app V.79 on Debian 9 and so far it works great running on kernnel 4.15.0-1-amd64. Hopefully, it continues to be this stable.
Sign In or Register to comment.