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

Error Connecting to VPN #167

Open
jacksaaa opened this issue Jan 3, 2019 · 18 comments
Open

Error Connecting to VPN #167

jacksaaa opened this issue Jan 3, 2019 · 18 comments

Comments

@jacksaaa
Copy link

jacksaaa commented Jan 3, 2019

When I tried to connect to vpn it gives me error I tried udp and tcp in deffrent contries, it dosen't work for me.
atached error log"sudo PROTONVPN_CLI_LOG=true ./protonvpn-cli.sh -f"
connection_logs.txt

@jeffshee
Copy link

Same error but the cause might not be the same
Here is my log files.
connection_logs.txt

ERROR: Linux route add command failed: external program exited with error status: 2

My android phone can connect to vpn without problem. They are both connecting to the same wifi.

@xilopaint
Copy link
Contributor

@jeffshee please, reinitialise your profile and choose n to Decrease OpenVPN privileges.

@jeffshee
Copy link

@xilopaint thanks. I have tried your suggestion, but still couldn't connect to the vpn.
Here is my log files again.
log.txt
Just notice that the error messages didn't come out for this time, hmm...

@xilopaint
Copy link
Contributor

@jeffshee what's the output for ifconfig tun0?

@jeffshee
Copy link

@xilopaint ifconfig tun0 return tun0: error fetching interface information: Device not found, which I think is fine because the connection hasn't been formed (?)

Btw if I try to connect to the vpn through my phone's hotspot, it works. And here is the log file and ifconfig tun0 for that case.
log.txt

ifconfig tun0
tun0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST>  mtu 1500
        inet 10.8.4.4  netmask 255.255.255.0  destination 10.8.4.4
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 100  (UNSPEC)
        RX packets 498  bytes 241522 (235.8 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 647  bytes 88713 (86.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

So I'm guessing perhaps there are some kind of restrictions exist in my environment (?) I tried wifi in my home and my university, both didn't work except my phone's hotspot. But again, my phone can connect to vpn using those wifi without problem, so there must be a way...

Thanks!

@xilopaint
Copy link
Contributor

@jeffshee what's your linux distro?

I don't know if it can make any difference, but you can create a persistent tun device with openvpn --mktun --dev tun0.

@ghost
Copy link

ghost commented Jan 14, 2019

Can't connect to the VPN anymore, either. Running Archlinux with 4.20 kernel and all current updates installed. Re-installed protonvpn-cli.sh several times, checked credentials and @xilopaint 's tip with the privileges as well, to no avail. It just stops the connection process after printing "Connecting..". No error message in the log file or console.
Connecting via phone works just fine.

@jeffshee
Copy link

jeffshee commented Jan 15, 2019

@xilopaint I'm using Fedora 29
After trying openvpn --mktun --dev tun0 as suggested, now the script try to connect through tun1 instead. In the log file, I've seen Unknown interface 'tun1': No such device, nothing differ except this.

@xilopaint
Copy link
Contributor

@jeffshee ok, since it didn't work you can remove the created persistent tun device with openvpn --rmtun --dev tun0.

Let's wait @mazen160 for further instructions.

@ghost
Copy link

ghost commented Jan 15, 2019

Weirdly enough, as of right now, connecting to the vpn works again without any further changes on my side.

@xilopaint
Copy link
Contributor

Weirdly enough, as of right now, connecting to the vpn works again without any further changes on my side.

Maybe an issue with a server in a specific country?

@ghost
Copy link

ghost commented Jan 15, 2019 via email

@jeffshee
Copy link

jeffshee commented Jan 15, 2019

Well, having no other option left, I decided to download the configuration files and give them a try. Ironically enough, they work fine lol. So if anyone else having the same weird problem, perhaps you should try them too and save your hairs.

@Tamaranch
Copy link
Contributor

@jeffshee Beware of DNS leaks using configuration files. One goal of protonvpn-cli is to avoid them.

@mazen160
Copy link
Collaborator

I'm not sure why this issue occured. The second log file you added does not share any indicators that there is an issue in your setup. Perhaps this way before decreasing OpenVPN privileges? I have seen errors occuring when OpenVPN privileges is decreased sometimes. The only solution is to run it as is (in root) to avoid this issue probably.

@rowbawts
Copy link

rowbawts commented Feb 1, 2019

I'm having the same issue with CentOS 7.5, I'm willing to attach logs and give more info to resolve this just let me know what you need.

@xilopaint
Copy link
Contributor

@jacksaaa @rowbawts do you still have issues?

@ghost
Copy link

ghost commented Jul 8, 2019

This is happening to me as well and has been consistent on Fedora. Nothing seems to consistently work except for TOR servers, while random connections to SC, P2P or standard servers are almost never successful.

Increasing or decreasing OpenVPN privileges seem to have no effect for me. Openresolv isn't in the Fedora or RPM Fusion repo's, but there is an Openresolv package from Roy Marples that, when installed increases the success rate of connections for me to nearly 100% on Fedora. On Ubuntu, the success rate is a bit more sporadic, but mostly successful with resolvconf, but when openresolv is installed, the success rate again jumps to nearly 100%.

Has anyone else experienced the same train of investigation as I have and if so, what's your rate of success?

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

No branches or pull requests

6 participants