protonvpn-cli icon indicating copy to clipboard operation
protonvpn-cli copied to clipboard

Error Connecting to VPN

Open jacksaaa opened this issue 6 years ago • 18 comments

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

jacksaaa avatar Jan 03 '19 16:01 jacksaaa

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.

jeffshee avatar Jan 13 '19 11:01 jeffshee

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

xilopaint avatar Jan 13 '19 19:01 xilopaint

@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...

jeffshee avatar Jan 14 '19 06:01 jeffshee

@jeffshee what's the output for ifconfig tun0?

xilopaint avatar Jan 14 '19 07:01 xilopaint

@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!

jeffshee avatar Jan 14 '19 08:01 jeffshee

@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.

xilopaint avatar Jan 14 '19 12:01 xilopaint

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.

ghost avatar Jan 14 '19 19:01 ghost

@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.

jeffshee avatar Jan 15 '19 03:01 jeffshee

@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.

xilopaint avatar Jan 15 '19 03:01 xilopaint

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

ghost avatar Jan 15 '19 05:01 ghost

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?

xilopaint avatar Jan 15 '19 06:01 xilopaint

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 <[email protected] 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 .

ghost avatar Jan 15 '19 07:01 ghost

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.

jeffshee avatar Jan 15 '19 08:01 jeffshee

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

Tamaranch avatar Jan 15 '19 11:01 Tamaranch

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.

mazen160 avatar Jan 17 '19 12:01 mazen160

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.

rowbawts avatar Feb 01 '19 06:02 rowbawts

@jacksaaa @rowbawts do you still have issues?

xilopaint avatar Mar 04 '19 08:03 xilopaint

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?

ghost avatar Jul 08 '19 05:07 ghost