Closed pszucs closed 5 years ago
Do you have a firewall?
It seems to be inactive:
sudo ufw status
Status: inactive
sudo iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Please, try sudo pvpn -cc US tcp
Same result. When the script outputs the error message ("Error connecting to VPN"), there are some entries being logged in the syslog, do you think it's something to do with the issue?
May 20 11:47:24 machine kernel: [34788.803462] IPv6: ADDRCONF(NETDEV_UP): enp2s0: link is not ready
May 20 11:47:24 machine avahi-daemon[822]: Joining mDNS multicast group on interface lo.IPv6 with address ::1.
May 20 11:47:24 machine avahi-daemon[822]: New relevant interface lo.IPv6 for mDNS.
May 20 11:47:24 machine avahi-daemon[822]: Registering new address record for ::1 on lo.*.
...
May 20 11:47:25 machine NetworkManager[838]: <info> [1558349245.5517] devices removed (path: /sys/devices/virtual/net/tun0, iface: tun0)
May 20 11:47:25 machine NetworkManager[838]: <info> [1558349245.5850] device (tun0): state change: activated -> unmanaged (reason 'unmanaged', sys-iface-state: 'removed')
May 20 11:47:25 machine dbus-daemon[832]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service' requested by ':1.16' (uid=0 pid=838 comm="/usr/sbin/NetworkManager --no-daemon " label="unconfined")
May 20 11:47:25 machine systemd[1]: Starting Network Manager Script Dispatcher Service...
May 20 11:47:25 machine dbus-daemon[832]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
May 20 11:47:25 machine systemd[1]: Started Network Manager Script Dispatcher Service.
May 20 11:47:25 machine nm-dispatcher: req:1 'down' [tun0]: new request (2 scripts)
May 20 11:47:25 machine nm-dispatcher: req:1 'down' [tun0]: start running ordered scripts...
May 20 11:47:25 machine nm-applet[1629]: gtk_widget_destroy: assertion 'GTK_IS_WIDGET (widget)' failed
May 20 11:47:25 machine nm-applet[1629]: gtk_widget_destroy: assertion 'GTK_IS_WIDGET (widget)' failed
May 20 11:47:25 machine wingpanel[1613]: gtk_widget_destroy: assertion 'GTK_IS_WIDGET (widget)' failed
May 20 11:47:25 machine nm-applet[1629]: Can't set a parent on widget which has a parent
May 20 11:47:25 machine nm-applet[1629]: gtk_widget_destroy: assertion 'GTK_IS_WIDGET (widget)' failed
May 20 11:47:25 machine nm-applet[1629]: gtk_widget_destroy: assertion 'GTK_IS_WIDGET (widget)' failed
May 20 11:47:25 machine nm-applet[1629]: Can't set a parent on widget which has a parent
May 20 11:47:25 machine io.elementary.cerbere.desktop[1608]: Failed to register: GDBus.Error:org.freedesktop.DBus.Error.NoReply: Message recipient disconnected from message bus without replying
May 20 11:47:26 machine systemd-resolved[766]: Server returned error NXDOMAIN, mitigating potential DNS violation DVE-2018-0001, retrying transaction with reduced feature level UDP.
May 20 11:47:26 machine systemd-resolved[766]: Server returned error NXDOMAIN, mitigating potential DNS violation DVE-2018-0001, retrying transaction with reduced feature level UDP.
May 20 11:47:26 machine avahi-daemon[822]: Joining mDNS multicast group on interface wlp3s0.IPv6 with address fe80::e6a0:7ee5:1070:31b9.
May 20 11:47:26 machine avahi-daemon[822]: New relevant interface wlp3s0.IPv6 for mDNS.
May 20 11:47:26 machine avahi-daemon[822]: Registering new address record for fe80::e6a0:7ee5:1070:31b9 on wlp3s0.*.
What's the output for pvpn --status
? You can hide your public IP.
Here's the output:
[OpenVPN Status]: Not Running
[ProtonVPN Status]: Not Running
[Internet Status]: Online
[Public IP Address]:
Is https://api.protonmail.ch/vpn/logicals accessible from your browser? You should get a json response.
Yes, it is.
@pszucs Try installing on a clean operating system or virtual machine and see if it works.
I use the linux distribution called Solus and everything works fine.
@cantalupo555 I can't re-install an OS every time I encounter an issue with a software I'm using. I'm glad you like Solus, but installing it is not an option for me.
@cantalupo555 I can't re-install an OS every time I encounter an issue with a software I'm using. I'm glad you like Solus, but installing it is not an option for me.
I understand, test your work environment on a virtual machine...
Have you tried using the .ovpn file?
@pszucs please, try to connect with openvpn directly using a config file. If it works the problem should be on your end.
I've tried the .ovpn file and the network manager as well, neither of them worked.
I found a live usb stick with Ubuntu on it and gave it a go. The first attempt failed (same error), but the consecutive tests (3-4 connection attempts) were successful.
Got back to my main OS and the same happened: the first connect failed and the following 4-5 ones were successful but then it failed to connect again.
I did some further testing to see if I was accidentally trying to connect to a server that is at 100% usage but found that was not the problem - I'm still unable to connect to them.
I've tried the .ovpn file and the network manager as well, neither of them worked.
I found a live usb stick with Ubuntu on it and gave it a go. The first attempt failed (same error), but the consecutive tests (3-4 connection attempts) were successful.
Got back to my main OS and the same happened: the first connect failed and the following 4-5 ones were successful but then it failed to connect again.
I did some further testing to see if I was accidentally trying to connect to a server that is at 100% usage but found that was not the problem - I'm still unable to connect to them.
As I thought, the problem is with your system...
I've tried the .ovpn file and the network manager as well, neither of them worked.
Have you tried sudo openvpn <config_file.ovpn>
?
Yes. At the end it shows the 'Initialization Sequence Completed' message, which, I guess, it means I'm connected to the server, however, I'm unable to browse the web, ping other servers, etc.
The only difference I can see between executing sudo openvpn config <config_file.ovpn>
and the protonvpn-cli is that when the former one is executed, after outputting the 'Initialization Sequence Completed' message it just hangs, whereas when using protonvpn-cli there's a 'SIGTERM' after about a minute:
Sun May 19 16:22:27 2019 us=816657 event_wait : Interrupted system call (code=4)
Sun May 19 16:22:27 2019 us=816696 SIGTERM received, sending exit notification to peer
So the above two lines are printed when using protonvpn-cli and also when pressing ctrl+c if sudo openvpn ...
is executed.
protonvpn-cli is just a wrapper for openvpn so if the latter is not working for you there's nothing we can do on the CLI side. The problem is with your setup.
OK, thanks for taking a look.
In case anyone is experiencing the same issue, here's what's worked for me (thanks to Bodan @ ProtonVPN):
It turned out that in my case I was connected to the ProtonVPN server, but the nameserver in the /etc/resolv.conf
file was not being updated - most likely because of some permission issue. This resulted in me not being able to visit websites using their domain name (but was able to using their IP addresses), ssh, etc. also worked.
Steps to follow:
(as part of the debugging process I set the immutable flag for resolv.conf so you might not need the first one)
sudo chattr -i /etc/resolv.conf
sudo pvpn --uninstall
sudo rm -f /etc/openvpn/update-resolv-conf*
sudo wget "https://github.com/ProtonVPN/protonvpn-cli/raw/master/protonvpn-cli.sh" -O "protonvpn-cli.sh" && sudo bash protonvpn-cli.sh --install
sudo wget "https://raw.githubusercontent.com/ProtonVPN/scripts/master/update-resolv-conf.sh" -O "/etc/openvpn/update-resolv-conf"
sudo chmod +x "/etc/openvpn/update-resolv-conf"
sudo pvpn --init
Do you know why your update-resolv-conf
script lost the executable permission?
I have no idea. I went through the apt upgrade history to see if there was any package/lib that might have been related to networking and found Nutty (https://github.com/babluboy/nutty) that I installed recently.
I don't remember having these connectivity issues after installing it so I'm not sure if it's to blame. Perhaps one of its dependencies? I don't know. :|
I've checked the other issues with the same title but none of them seems to be the same as this one. The cli has worked fine until about a day or two ago.
Please see the contents of
.protonvpn-cli/connection_logs
:There's a 60+ seconds gap between the
and the
lines. The script displays the 'Connecting...' message and then it seems it hits a timeout limit (after about a minute) and I'll get the error:
What's interesting is that I was able to connect using my phone's internet (wi-fi hotspot) but I'm not able to via the router (home network).
At this point I thought it must be an ISP / router issue, however, my phone is able to connect to protonvpn servers using the android app on the same (home) network.