Skip to content
This repository has been archived by the owner on Feb 4, 2020. It is now read-only.

Error connecting to VPN #92

Closed
Bloopps opened this issue Apr 17, 2018 · 30 comments
Closed

Error connecting to VPN #92

Bloopps opened this issue Apr 17, 2018 · 30 comments
Labels
Closed - User Confirmation Needed Closed - User Confirmation Needed

Comments

@Bloopps
Copy link

Bloopps commented Apr 17, 2018

Hello,
I try to use protonvpn-cli in my last Debian 9.4 but when i launch ./protonvpn-cli.sh -c this message is return =>

Connecting...
[!] Error connecting to VPN.
[!] There are issues in managing IPv6 in the system. Please test the system for the root cause.
Not being able to manage IPv6 by protonvpn-cli might cause issues in leaking the system's IPv6 address.

My IP has not changed, when I check with the command ./protonvpn-cli.sh --ip .
Thanks

@mazen160
Copy link
Collaborator

Hi @Bloopps
Can you provide logs for debugging:

$ PROTONVPN_CLI_LOG=true ./protonvpn-cli.sh -f

A log file will be created, please either upload it here, or email it to me via mazin at protonmail dot com.

Once the log file is sent, I will validate and debug the root cause.

Best regards,
Mazin

@xilopaint
Copy link
Contributor

xilopaint commented Apr 18, 2018

I try to use protonvpn-cli in my last Debian 9.4 but when i launch ./protonvpn-cli.sh -c this message is return

You should not run ./protonvpn-cli.sh -c, use sudo protonvpn-cli -c or sudo pvpn -c instead. If it doesn't succeed to connect, ensure protonvpn-cli is updated by running sudo pvpn -update and try again.

@Bloopps
Copy link
Author

Bloopps commented Apr 18, 2018

@mazen160 i sended you a email

@xilopaint ok, but when i try to use sudo protonvpn-cli -c or sudo pvpn -c

myuser@debian:~/protonvpn-cli$ sudo protonvpn-cli -c
sudo: protonvpn-cli : commande introuvable
myuser@debian:~/protonvpn-cli$ sudo pvpn -c
sudo: pvpn : commande introuvable
myuser@debian:~/protonvpn-cli$

Thanks for reply

@Rafficer
Copy link
Contributor

You need to do sudo ./protonvpn-cli --install and then sudo pvpn --init first.

@Bloopps
Copy link
Author

Bloopps commented Apr 18, 2018

@Rafficer Ok,

myuser@debian:~/protonvpn-cli$ sudo protonvpn-cli -f
Fetching ProtonVPN Servers...
Connecting...
[!] Error connecting to VPN.

@Rafficer
Copy link
Contributor

Can you provide logs as @mazen160 mentioned above?

@Bloopps
Copy link
Author

Bloopps commented Apr 18, 2018

Yes,

protonvpn-cli-logs-zhTwrvv7.txt

@mazen160
Copy link
Collaborator

Wed Apr 18 17:50:23 2018 us=786288 VERIFY EKU OK
Wed Apr 18 17:50:23 2018 us=786291 VERIFY OK: depth=0, CN=fr-08.protonvpn.com
Wed Apr 18 17:50:26 2018 us=48358 Control Channel: TLSv1.2, cipher TLSv1/SSLv3 ECDHE-RSA-AES256-GCM-SHA384, 2048 bit RSA
Wed Apr 18 17:50:26 2018 us=48403 [fr-08.protonvpn.com] Peer Connection Initiated with [AF_INET]185.94.189.190:1194
Wed Apr 18 17:50:27 2018 us=182246 SENT CONTROL [fr-08.protonvpn.com]: 'PUSH_REQUEST' (status=1)
Wed Apr 18 17:50:29 2018 us=323982 AUTH: Received control message: AUTH_FAILED
Wed Apr 18 17:50:29 2018 us=324166 TCP/UDP: Closing socket
Wed Apr 18 17:50:29 2018 us=324202 SIGUSR1[soft,auth-failure] received, process restarting

AUTH_FAILED. @Bloopps This is mostly means you entered an invalid credentials on your profile.

@mazen160
Copy link
Collaborator

@Bloopps
Have you entered Proton ID or ProtonVPN openvpn credentials?
Can you please try connecting to the server via openvpn config file available on website to confirm if you can connect normally?

@mazen160 mazen160 added the Closed - User Confirmation Needed Closed - User Confirmation Needed label Apr 19, 2018
@ace4dude
Copy link

ace4dude commented Apr 21, 2018

Same issue here, got exactly the same message on K/ubuntu 17.10. And after deleting all directories protonvpn.cli and .protonvpn-cli in the HOME directory, re-installed and init but this time got the following error:
Connecting...
[!] Error connecting to VPN.
Note: this is the up-to-date protonvpn-cli as the update shows. All these were done with the Free package for ProtonVPN openvpn credentials

@xilopaint
Copy link
Contributor

@ace4dude please, provide logs as @mazen160 mentioned above.

@ace4dude
Copy link

here you go:
protonvpn-cli-logs-0X8CLBT9.txt

@ace4dude
Copy link

And the weird thing is now I can connect on other Windows PC using ProtonVPN app, but 6 hours ago I can connect on both K/ubuntu and Windows machines. The protonvpn-cli had the same issue on and off in past a few days, most of time it worked but sometimes it didn't.

@mazen160
Copy link
Collaborator

@ace4dude
The logs do not show the issue you're facing unfortunately.

I suspect it's an issue in your network or system (with openvpn)

The second approach now is going to Protonvpn.com website and downloading openvpn config manually, and try it using the openvpn package. If it worked, then there is a problem on protonvpn-cli, otherwise the issue would be on your internet connection or system setup.

@ace4dude
Copy link

@mazen160

I restarted the system on a live ubuntu USB stick, and re-installed the protonvpn-cli and init it, the 1st error message was the same as shown in the above 1st comment:

Connecting...
[!] Error connecting to VPN.
[!] There are issues in managing IPv6 in the system. Please test the system for the root cause.
Not being able to manage IPv6 by protonvpn-cli might cause issues in leaking the system's IPv6 address.

then all error messages for the sequential connection attempts are the same as the following:

Connecting...
[!] Error connecting to VPN.

I also tried using openvpn on downloaded config file, it shows as follows after the openvpn credentials entered:

Sun Apr 22 09:44:52 2018 WARNING: --ping should normally be used with --ping-restart or --ping-exit
Sun Apr 22 09:44:52 2018 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Sun Apr 22 09:44:52 2018 Outgoing Control Channel Authentication: Using 512 bit message hash 'SHA512' for HMAC authentication
Sun Apr 22 09:44:52 2018 Incoming Control Channel Authentication: Using 512 bit message hash 'SHA512' for HMAC authentication
Sun Apr 22 09:44:52 2018 TCP/UDP: Preserving recently used remote address: [AF_INET]69.171.224.85:1194
Sun Apr 22 09:44:52 2018 Socket Buffers: R=[212992->212992] S=[212992->212992]
Sun Apr 22 09:44:52 2018 UDP link local: (not bound)
Sun Apr 22 09:44:52 2018 UDP link remote: [AF_INET]69.171.224.85:1194
Sun Apr 22 09:45:52 2018 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
Sun Apr 22 09:45:52 2018 TLS Error: TLS handshake failed
Sun Apr 22 09:45:52 2018 SIGUSR1[soft,tls-error] received, process restarting
Sun Apr 22 09:45:52 2018 Restart pause, 5 second(s)
Sun Apr 22 09:45:57 2018 WARNING: --ping should normally be used with --ping-restart or --ping-exit
Sun Apr 22 09:45:57 2018 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
.....

All connection attempts failed. Not sure what gets wrong with the notebook for protonvpn-cli, but the other Windows machine connected on the same wireless router works fine with the ProtonVPN app. The notebook worked fine with protonvpn-cli most of time in past a few days after I got started with ProtonVPN although sometimes it showed some error messages during connetion attempts but the connection would go though anyway. But now it just doesn't connect at all.

@ace4dude
Copy link

Now the error messages become the following:

Connecting...
[!] Error connecting to VPN.
[!] This is an error in enabling ipv6 on the machine. Please enable it manually.`

@FriendlyGremlin
Copy link

FriendlyGremlin commented Apr 22, 2018

I have the same problem. I also get the "There are issues in managing IPv6 in the system."

It's on a fresh Lubuntu 16.04 LTS install, nothing else network-related was installed and I followed the steps on protonvpn.com/support/linux-vpn-tool/ to the letter.

The IPv6 configuration in Lubuntu's network manager is all set to defaults. And: On my windows machine, ProtonVPN works just fine.

Edit: I tried following the instructions for importing the OpenVPN settings manually (using network-manager-gnome), and here the connection succeeds, but the DNS unfortunately leaks.

Other than that, I had a look at the logs @ace4dude provided, and mine look pretty much the same. What kills the connection at the end is the same event_wait : Interrupted system call (code=4). Up to that point, the Log looks fine.

As mentioned, using the same router and ISP, I can connect to ProtonVPN using Windows and Android devices (and on Linux, using the manual OpenVPN config, though this leaks the DNS), so I fear this may well be a problem with protonvpn-cli.

@ace4dude
Copy link

@mazen160
Can you make the previous version of protonvpn-cli prior to April 21 available for downloading? Versions prior to April 21 had worked for me. The April 21 version in which changes on sha512sum were committed has never connected to VPN for me since.

I suggest making 2 versions of protonvpn-cli available for downloading : one for stable version that the previous version has worked for the most of users, and one for test version which the new changes are committed so that we can test it. If the test version works we'll use it, or we can roll back to the previous version if it doesn't.

@xilopaint
Copy link
Contributor

@ace4dude have you tried to revert the changes of the last commit in order to confirm it was the cause of the issue?

@mazen160
Copy link
Collaborator

Hi @ace4dude

If you're unable to connect with openvpn manually, then the problem appears to be from your VPN plan or machine.

Here is the previous version before April 21st:
https://raw.githubusercontent.com/ProtonVPN/protonvpn-cli/bc5754b18bb3e8d030918ed66116b7ae4c451778/protonvpn-cli.sh

the latest update only introduced an update for shasum usage, nothing that should affect the VPN connection.

@ace4dude
Copy link

ace4dude commented Apr 28, 2018

@mazen160 @xilopaint
Tested on the latest released K/Ubuntu 18.04LTS, the protonvpn-cli also doesn't work and returns the error message: Error connecting to VPN. I'v installed miredo to ensure that IPv6 is available on the machine so this is not related to the IPv6 issue. My best guess is either the Free ProtonVPN plan is no longer working since the Linux machine has been using this plan over a couple of weeks, or the protonvpn-cli itself has some issues since a week ago. My other Windows machine is currently using the ProtonVPN Windows app in the trial period so it's still working, not sure what'll happen when the trial period ends and switches to the Free ProtonVPN plan.

Update: Now the Windows ProtonVPN app is running on the Free ProtonVPN plan, so the network here is ok with the free plan. So far in this thread we have 3 different sources confirming there're some issues in the protonvpn-cli that prevent connection to VPN servers.

@ace4dude
Copy link

Also tested in K/ubuntu 18.04LST using different connection commands, the protoncpn-cli has the following different error messages:
using command sudo pvpn -f returns error message as follows:

Connecting...
[!] Error connecting to VPN.

while using command sudo pvpn -c and selecting a nearest server then selecting either udp or tcp returns error message as follows:

Connecting...
[!] Error connecting to VPN.
[!] There are issues in managing IPv6 in the system. Please test the system for the root cause.
Not being able to manage IPv6 by protonvpn-cli might cause issues in leaking the system's IPv6 address.

@ace4dude
Copy link

ace4dude commented Apr 30, 2018

@mazen160 @xilopaint
In the issue #77 where @xilopaint provided the previous version

@acwhite3 here is the version prior the last two commits:

https://raw.githubusercontent.com/ProtonVPN/protonvpn-cli/e27c42485ac495148df3dc1c5e349a3ffcdad49c/protonvpn-cli.sh

this is the version that protonvpn-cli wokrs! For now at least! I've tested it on K/Ubuntu 18.04LTS and both commands sudo pvpn -f and sudo pvpn -c now work perfectly connecting to the VPN server. The changes made in protonvpn-cli after this version somehow disrupt connection attempts to the VPN server and won't work.

Updates: The command sudo pvpn -f sometime doesn't work and returns error message: [!] Error connecting to VPN. In this case, what I do is first using the command sudo pvpn -cto connect to VPN server - this command sudo pvpn -c always works for now, then using the command sudo pvpn -fusually will work.

@mazen160
Copy link
Collaborator

mazen160 commented May 1, 2018

Hi all,

Today I had a session to check all reported issues.

@mazen160
Copy link
Collaborator

mazen160 commented May 1, 2018

@Bloopps
AUTH_FAILED

This means the following:
1- You entered an invalid credentials.
2- You are connecting to a server with higher plan (you don't have permission to connect to that server).
3- You reached the maximum devices to be used with protonvpn.
4- Your account is de-activated.

@mazen160
Copy link
Collaborator

mazen160 commented May 1, 2018

@ace4dude

The issue you're facing is the following:
when you're trying to connect, openvpn runs on an async process, while another process is checking whether a valid connection was made during a certain time.
If a timeout is reached, the openvpn process is terminated, and printing an error. The error basically means that no connection were established.

Based on the logs, this means that you're facing an internet issue (Maybe a firewall, or some sort of network restrictions that block OpenVPN), or there is a connection speed issue.

Also, there might be an issue on the server you're connecting to, but the most conclusion would be on the reasons above.

For both issues, I honestly can not do much to fix the issue, since it's relying on your network setup as mentioned above. I have increased the timeout in order to help resolving the issue on networks with relatively slower connections, but this will not help against network filtering.

@mazen160
Copy link
Collaborator

mazen160 commented May 1, 2018

@Bloopps @ace4dude
Here what I can suggest, please use the manual openvpn configurations from the protonvpn website, and then if it's not working too, then the issue is confirmedly affecting your network setup. If you can connect fine to the VPN server, then trying to connect to the same server via protonvpn-cli, then the issue would affect protonvpn-cli.

Please re-test it, and let me know. I'm currently starting building the next version of protonvpn-cli based on all feedback received. I will be closing the ticket for now to organize everything, and I would be happy to help if you're still facing the issue.

Thank you all!! :)

Best,
Mazin

@ace4dude
Copy link

ace4dude commented May 2, 2018

@mazen160
Tested the manual openvpn config file and it doesn't connect shown as follows:

Wed May  2 21:28:33 2018 OpenVPN 2.4.4 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Feb 10 2018
Wed May  2 21:28:33 2018 library versions: OpenSSL 1.1.0g  2 Nov 2017, LZO 2.08
Enter Auth Username: ###############
Enter Auth Password: ************************
Wed May  2 21:28:49 2018 WARNING: --ping should normally be used with --ping-restart or --ping-exit
Wed May  2 21:28:49 2018 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Wed May  2 21:28:49 2018 NOTE: --fast-io is disabled since we are not using UDP
Wed May  2 21:28:49 2018 Outgoing Control Channel Authentication: Using 512 bit message hash 'SHA512' for HMAC authentication
Wed May  2 21:28:49 2018 Incoming Control Channel Authentication: Using 512 bit message hash 'SHA512' for HMAC authentication
Wed May  2 21:28:49 2018 TCP/UDP: Preserving recently used remote address: [AF_INET]31.13.73.23:443
Wed May  2 21:28:49 2018 Socket Buffers: R=[87380->87380] S=[16384->16384]
Wed May  2 21:28:49 2018 Attempting to establish TCP connection with [AF_INET]31.13.73.23:443 [nonblock]
Wed May  2 21:30:49 2018 TCP: connect to [AF_INET]31.13.73.23:443 failed: Connection timed out
Wed May  2 21:30:49 2018 SIGUSR1[connection failed(soft),init_instance] received, process restarting
Wed May  2 21:30:49 2018 Restart pause, 5 second(s)

but the protonvpb-cli cited in

@acwhite3 here is the version prior the last two commits:

https://raw.githubusercontent.com/ProtonVPN/protonvpn-cli/e27c42485ac495148df3dc1c5e349a3ffcdad49c/protonvpn-cli.sh

at the same condition does connect perfectly. As stated in previous comments, the protonvpn-cli after this version doesn't connect at the same condition.

@mazen160
Copy link
Collaborator

mazen160 commented May 2, 2018

@ace4dude
Based on the logs new logs you provided, this shows that there timeout occurred, which confirms the concept of network filtering.

The chance that protonvpn-cli worked in this situation is might be a coincidence (network filter maintenance or similar incidents?).

@joshonjuno
Copy link

I was having the same issue on a clean install of Elementary Juno. Thought it had something to do with the beta-ish OS. For whatever reason, what fixed it for me was choosing NO to the "dns extra security" option during set-up, which, by the way, was the first time I've ever seen that option. Hope that helps someone out. :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Closed - User Confirmation Needed Closed - User Confirmation Needed
Projects
None yet
Development

No branches or pull requests

7 participants