Peterborough Linux User Group (Canada) Forum

Linux & Android => Support => Topic started by: fox on November 24, 2019, 05:23:05 PM

Title: Reconnection issue
Post by: fox on November 24, 2019, 05:23:05 PM
Well I bought the PIA for two years for $70US. Just trying it now on Ubuntu. Works easy enough and seems ok speedwise so far. But it seems to have to reconnect often. Comments?
Title: Re: Re: PIA VPN renewal special offer
Post by: Jason on November 24, 2019, 06:38:24 PM
Quote from: fox on November 24, 2019, 05:23:05 PM
Well I bought the PIA for two years for $70US. Just trying it now on Ubuntu. Works easy enough and seems ok speedwise so far. But it seems to have to reconnect often. Comments?

It definitely shouldn't be doing that. Some things to try in order:
Title: Re: Reconnection issue
Post by: fox on November 24, 2019, 10:28:15 PM
Now I'm having a lot of problems with PIA and I'm not impressed. If I have it running and either change the connection or it goes to sleep, I get no connection. If I turn it off, I have no connection. If I turn off and then on my internet to try to clear it, I have no connection. The only thing that works is a reboot. I haven't had this problem with an other VPN I've tried. If I can't solve this, I'm going to cancel and ask for my money back.

I put in a request for help on this to PIA. Meanwhile, I installed it on my iPad and it works well on it. I can turn it on or off without any impact on my internet connection.
Title: Re: Reconnection issue
Post by: ssfc72 on November 25, 2019, 04:17:28 AM
I have had no problems at all, with PIA VPN. I am only running a Mint Distro and I don't use Windows.
Title: Re: Reconnection issue
Post by: Jason on November 25, 2019, 04:24:20 AM
It's unclear to me in your last post if you tried my suggestions - namely, (1) and (2). With (2), you might have but I'm not sure. You said that you "turn it off". Do you mean you use the client option to Disconnect or actually choose the 'Quit' option?

Here's why I'm asking you to be more specific. If you have the kill switch on, it will disable your connection when the client is disabled (i.e. not connected). I don't mean just the VPN connection - I mean that you will not be able to connect to the internet, period. This isn't a bug, it's a feature. It's to prevent applications potentially sending un-encrypted data over the internet if you lose the connection to a VPN server.

Here's two other potential ways to solve this problem with clients:It helps me to help you if when you try options or let me know that you've already tried them if you refer to the numbers above.

Other than these possible solutions, I can't think of anything else off hand.
Title: Re: Reconnection issue
Post by: fox on November 25, 2019, 08:46:42 AM
1. Try a different server.
    - Couldn't do that; I don't have any servers connected to this computer. However, I have since installed PIA on my Android tablet and it is working OK. (Same with iPad.)

2. Restart the PIA client (close it and then start it again)
    - Tried that; no internet after restarting

3. Disconnect your Ethernet (or wireless) connection and then reconnect it. It will take a second for the PIA client to see the network connection again and restart.
    - No ethernet on this computer. When I disconnected the wireless and then reconnected it, I had no internet.

4. Try rebooting. I hate to say it but sometimes it really works.
    - That was the only option that worked.

So I followed your suggestion to disable the kill switch and enable small packets. I then restarted with PIA enabled. This gave some improvement in that your suggestion #2 above mostly works. (I get browsing and receive email, but I can't send it most of the time.) But still, if I disconnect from the PIA window, I don't get internet even if I do #3. Restarting of course turns it back on.

I'm wondering if the problem has anything to do with openVPN. I already had that installed and had added some UDP settings associated with FastestVPN (the one I was using). Should I be either uninstalling openVPN (not sure how to do that)? I suppose I could add PIA settings to openVPN, but unless I add a bunch of them, this is kind-of nullifying one of the advantages of using PIA in the first place.

The other things I'm wondering about are the PIA settings under the Network tab. Would port forwarding or allowing LAN traffic help my situation? I'm not familiar with what they do.
Title: Re: Reconnection issue
Post by: Jason on November 25, 2019, 01:54:27 PM
Quote from: fox on November 25, 2019, 08:46:42 AM
1. Try a different server.
    - Couldn't do that; I don't have any servers connected to this computer. However, I have since installed PIA on my Android tablet and it is working OK. (Same with iPad.)

I meant try a different VPN Server, you can choose what you connect to,

QuoteI'm wondering if the problem has anything to do with openVPN. I already had that installed and had added some UDP settings associated with FastestVPN (the one I was using). Should I be either uninstalling openVPN (not sure how to do that)? I suppose I could add PIA settings to openVPN, but unless I add a bunch of them, this is kind-of nullifying one of the advantages of using PIA in the first place.

YES! YES! YES! You can't have two VPNs going at the same time! You need to uninstall or disable the openVPN for the other VPN provider. This is likely your issue. It's like trying to connect to two ISPs as the time. The other VPN provider is likely stealing away control from PIA.

QuoteThe other things I'm wondering about are the PIA settings under the Network tab. Would port forwarding or allowing LAN traffic help my situation? I'm not familiar with what they do.

Port forwarding is if you want your computer reachable from the internet. Allowing LAN traffic lets you connect to other devices on your local network like a wireless printer or another computer. Not every VPN server lets you do this but you can leave it on and it won't hurt anything.

But before trying anything else, disable your other VPN. Then uninstall the PIA client. This should get you back to your original non-VPN enabled network settings. Then re-install PIA. Now it should work. If it doesn't try my other suggestions in the new post I made above. They weren't numbered before but they are now.
Title: Re: Reconnection issue
Post by: fox on November 25, 2019, 02:03:57 PM
Thanks Jason. Regarding other servers, I could connect to others when PIA was running. But regardless of PIA server I was connected to, I still had the problem.

Regarding openVPN, the setup doesn't let you have two connections at the same time, at least as far as I can tell. The other connections I set up through openVPN were off when I was running PIA.

And there is a new development. I added a PIA connection to the openVPN connection options, and this works in every way, including allowing me to turn it on and off without loss of internet. The problem with this method is no server flexibility. The nice thing about PIA is all the servers it runs, and I can see reasons why I might want to connect to different ones at different times. But when set up through openVPN, each server has to have a different setup. I did set up a few, but that's a kludge compared to use of the PIA app to change servers. I'm hoping that PIA tech support can tell me how to fix this.
Title: Re: Reconnection issue
Post by: Jason on November 25, 2019, 08:34:14 PM
The openvpn option in network settings won't let you have two VPNs at the same time provided they're using the Network Manager. But if one is a client, like with PIA, it won't see the openvpn setting. That's why PIA has separate instructions for openvpn or the client setup. They are two different ways to do it but you can't do both of them at the same time, even if they're both PIA, AFAIK.

And yes, using openvpn is a bit of a pain that way. I had to do that when I was trying out fedora. There should be a list of servers you can download but you still have have to program the password (maybe login, too?) for each connection. You shouldn't have to enter the information for each server - that should be handed by the .crt file you loaded into the configuration, I believe. At least, the way I remember it, you didn't have to. I downloaded a file that I loaded into openvpn and from then on I had to enter the password for each server I wanted to use (which was then saved for next time). I don't use a lot of different servers so I just added about 6.
Title: Re: Reconnection issue
Post by: fox on November 25, 2019, 09:33:13 PM
So are you saying that because I have an openVPN setup with another VPN, that PIA can't work unless it's also set up the same way? PIA works much better than FastestVPN (connects faster and seems faster at opening sites), so if this was the case, I would dump FastestVPN and openVPN to work PIA through the app. I know that the problem isn't with Ubuntu 19.10 gnome per se because PIA works fine through the app on my xps.

You're right about how to set up PIA through openVPN. It's all in one file, and opening a different server is accomplished by invoking its particular gateway. I set up four PIA servers; easy enough to do. But I still have the FastestVPN gateways as options; I can choose whichever I want. I would still rather do PIA through the app.
Title: Re: Reconnection issue
Post by: Jason on November 26, 2019, 12:40:55 AM
Quote from: fox on November 25, 2019, 09:33:13 PM
So are you saying that because I have an openVPN setup with another VPN, that PIA can't work unless it's also set up the same way?

No, I just meant if you're using a the PIA client at the same time as using another a VPN setup via openvpn, it probably won't work. The client probably wouldn't know you were using FastestVPN if that was enabled at the same time. Honestly, I'd go with what is working now until the PIA support can help you. At least you know now the service works for you and so you're not under time pressure to get it completely solved. But if you're really determined to get the client working, read on:

Remove FastestVPN entirely (including any openvpn settings) and then see if the PIA client is more functional after. You may need to re-install the PIA client so it recognizes the changed settings. Do make sure that you disable the openvpn connection to try out the client. It'd probably work anyway as PIA would view it as two different connections but I wouldn't recommend it.

It sounded like you were saying you had the kill switch enabled. If it was, that changes network settings at a lower level. It basically lets PIA override your network settings so nothing can connect unless it's connected to a server. But removing the client and reinstalling it would reset your network settings back to the way it was (it won't affect any openvpn settings you have, AFAIK).

I hope I didn't just add to the confusion. I have a penchant for blather.
Title: Re: Reconnection issue
Post by: Jason on November 26, 2019, 12:44:13 AM
When you're changing stuff that can could wreck your network connection even though it's temporary, it's good to create a Timeshift backup. Do it before you make changes and you can easily roll them back. It's a lot easier than changing back a whole bunch of connection settings. For example, you could do it above before removing FastestVPN, uninstalling PIA and reinstalling it. That way you can fall back to your openvpn PIA if it doesn't work out.
Title: Re: Reconnection issue
Post by: fox on November 26, 2019, 07:16:24 AM
Thanks, Jason. I think I finally understand how openVPM is interfering with PIA when running the latter from the app. I googled "uninstall openVPM" and came up with this (https://askubuntu.com/questions/455504/removing-openvpn-and-all-modifications). It mentions that you have to disable it in systemd as well, and I suspect that this is where the problem lies. I also suspect that I didn't have the problem on my xps because openVPN wasn't installed on it.

As you noted, I have everything working right with PIA running in openVPM. The connection to the server is fast and internet speed is good. The only negatives are that it connects to a specific server instead of looking for the fastest one (which is almost always Toronto), and I have to set up any server I want to connect to manually (easy now that I know how). So I'm going to take your advice and wait to hear from PIA tech support before making any further modifications.
Title: Re: Reconnection issue
Post by: Jason on November 26, 2019, 09:31:45 AM
Sounds good. Let us know how it works out.
Title: Re: Reconnection issue
Post by: fox on December 02, 2019, 04:15:55 PM
It's now working OK. The Tech support guy indicated that having OpenVPN shouldn't affect the use of the PIA app as long as I didn't have a simultaneous OpenVPN connection. I don't know what I did, but I was fooling around with various settings in both the PIA app and OpenVPN, and now everything is working. I can open or change a PIA connection through the app, disconnect period, reconnect later. The only thing that doesn't work (or works on and off) is outgoing mail from Thunderbird; my SMTP server is Microsoft Outlook. The Tech Support guy explained that MS itself is blocking output through mail clients (as opposed to a browser connection) due to the use of spam by some PIA users. Easy fix - turn off PIA when sending mail.

Thanks anyway for your help, Jason.
Title: Re: Reconnection issue
Post by: Jason on December 02, 2019, 06:04:02 PM
Glad it's finally working for you the way it's supposed to, Fox. Regarding the email, that's totally correct. Many email services will not reject the IP addresses associated with certain VPNs for the reason the support person noted. Instead of having to remember to disconnect and then reconnect again, you can make exceptions in the PIA client:

https://www.privateinternetaccess.com/helpdesk/kb/articles/split-tunnel-app-examples

Scroll down for the suggestions of where apps (like Thunderbird) are located so you can exclude them from using PIA.
Title: Re: Reconnection issue
Post by: fox on December 02, 2019, 06:21:46 PM
Thanks for that, Jason. The link mentioned Thunderbird, but it gave the wrong location for the executable file. It was in the /usr/bin directory. But once I excluded it, I could send a message!!
Title: Re: Reconnection issue
Post by: Jason on December 02, 2019, 11:36:58 PM
It does mention that the locations can vary among distributions. How did you find it? Did your just go to edit the icon and then look at the location there? That's usually how I do it when something requires knowing the exact location of an executable for a program.
Title: Re: Reconnection issue
Post by: fox on December 02, 2019, 11:44:13 PM
I'll remember that trick next time. In my case I guessed the location because it is a binary. Ironically, I guessed the correct location immediately and put in the exception, but deleted it before trying when you posted the link to that location. There was a file named Thunderbird there, but it was the wrong one and it didn't work, so Iwent back to /usr/bin.
Title: Re: Reconnection issue
Post by: Jason on December 03, 2019, 12:14:37 AM
Ah, so you remembered that binaries are in /usr/bin from your Linux filesystem knowledge. Good show!
Title: Re: Reconnection issue
Post by: Jason on December 03, 2019, 12:16:56 AM
I wish they could allow exceptions for certain websites, like my beloved Netflix which gets cross with me every time I show up there using a VPN. When I click to play a show or movie, it spits out an error telling me to turn off my proxy or VPN. Very annoying. I turn it off and then forget to turn it back on when I go to other websites! Getting old, I guess :)
Title: Re: Reconnection issue
Post by: fox on December 09, 2019, 07:59:41 AM
This gets more interesting. I had a message that I sent out earlier in the day from my university email; it was in my Sent message folder. I added to it to send out again, and forgot to turn off PIA. The message went out anyway. Would that have gone out because it had previously gone out with my university address? And if so, who is blocking the other messages - Microsoft or my university?
Title: Re: Reconnection issue
Post by: ssfc72 on December 09, 2019, 10:25:29 AM
Your University IT guy that is responsible for their email, should be able to say if the email was being blocked by them, when you use a VPN.
Title: Re: Reconnection issue
Post by: Jason on December 09, 2019, 04:50:52 PM
Quote from: fox on December 09, 2019, 07:59:41 AM
This gets more interesting. I had a message that I sent out earlier in the day from my university email; it was in my Sent message folder. I added to it to send out again, and forgot to turn off PIA. The message went out anyway. Would that have gone out because it had previously gone out with my university address? And if so, who is blocking the other messages - Microsoft or my university?

Okay, so just to clarify:
What changed between (2) and (3) that would make you wonder why it shouldn't work? I must be missing something here. It should work now whether PIA is connected or not.
Title: Re: Reconnection issue
Post by: fox on December 09, 2019, 06:16:13 PM
Very perceptive, Jason. I missed posting that the exception I put in didn't do anything. I just looked and the exception is still there. At any rate, now thinking about it, it couldn't have been Thunderbird itself that was the problem, as it connects OK to receive mail. So unfortunately I'm still having to turn off the VPN to send messages.

I don't know if this will help, but I got a message today from PIA IT stating that they have whitelisted the SMTP IP/Domain of Outlook, but I will have to replace its smtp with an IP number they gave me. They suggest that I allow 48-72 hours for process completion. So I will try this in a few days and will report back.
Title: Re: Reconnection issue
Post by: Jason on December 09, 2019, 07:01:43 PM
Quote from: fox on December 09, 2019, 06:16:13 PM
Very perceptive, Jason. I missed posting that the exception I put in didn't do anything. I just looked and the exception is still there. At any rate, now thinking about it, it couldn't have been Thunderbird itself that was the problem, as it connects OK to receive mail. So unfortunately I'm still having to turn off the VPN to send messages.

Receiving email is different. It goes through a different server, not necessarily a different physical one, just different server software. Mail is sent using SMTP and usually connects to smtp.yourisp.com while receiving email goes through imap.yourisp.com or pop3.yourisp.com.

Most smtp servers will check to see where the connection is coming from before accepting a connection so there will be blocks. It's done to avoid spammers using their servers to send email. Spammers do this because their own smtp servers built into their own servers have been blacklisted. They used to just accept connections even without a username and password. Then they required authentication. Now they require that and check the IP address of the connecting user. Some go as far as only allowing it if you're connecting from their network (for example, ISPs). Unfortunately, PIA has people using it that don't have the best intentions. So if were on nexicom and tried to send a message from off of their network, they might reject the connection and not allow the email to go through because it's from outside their network.

The servers don't care who connects to receive email as long as you have an appropriate username and password. So you could be sending your email through Microsoft but it's received from a server at the university. Or it's stored on both but Microsoft only filters connections to the SMTP server.

QuoteI don't know if this will help, but I got a message today from PIA IT stating that they have whitelisted the SMTP IP/Domain of Outlook, but I will have to replace its smtp with an IP number they gave me. They suggest that I allow 48-72 hours for process completion. So I will try this in a few days and will report back.

It may. I think what it means is that they will receive your emails that you send through their server which will act as a pass through to the actual SMTP server you use. If you get registered as an SMTP server, then other servers will accept email from it which is essentially what they're doing.
Title: Re: Reconnection issue
Post by: fox on December 09, 2019, 07:06:09 PM
If Ido this, does that mean I can’t send email unless I’m connected to a PIA server?