ProtonVPN / protonvpn-cli

Legacy protonvpn-cli: ProtonVPN Command-Line Tool for Linux and macOS. This has been superseded by https://github.com/ProtonVPN/protonvpn-cli-ng
Other
602 stars 96 forks source link

Error Connecting to VPN #167

Open jacksaaa opened 5 years ago

jacksaaa commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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

jeffshee commented 5 years ago

@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 commented 5 years ago

@jeffshee what's the output for ifconfig tun0?

jeffshee commented 5 years ago

@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 commented 5 years ago

@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 commented 5 years ago

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 commented 5 years ago

@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 commented 5 years ago

@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 commented 5 years ago

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

xilopaint commented 5 years ago

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 commented 5 years ago

Not likely as I have tried several servers manually as well as '-f' and '-cc [different countries] [UDP/TCP]'.

On Tue, Jan 15, 2019, 07:02 Arthur Pinheiro <notifications@github.com wrote:

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?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ProtonVPN/protonvpn-cli/issues/167#issuecomment-454276994, or mute the thread https://github.com/notifications/unsubscribe-auth/AqjAvuyriTbUaszOb1r-yUIuanICB4Y4ks5vDW8SgaJpZM4Zob2c .

jeffshee commented 5 years ago

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 commented 5 years ago

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

mazen160 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

@jacksaaa @rowbawts do you still have issues?

ghost commented 5 years ago

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?