manjaro-pinephone / phosh

Manjaro Phosh
164 stars 20 forks source link

Lost Ability to Use VPN >Beta 28 #72

Closed ajsingh007 closed 1 year ago

ajsingh007 commented 1 year ago

I enjoy using Manjaro on the PinePhone Pro daily as a "Developer Companion" if you will and noticed that on Beta 29 and 30 I can no longer use my VPN with a WiFi connection. Anyone have insight on a solution?

I went through the trouble of doing a fresh install of Manjaro Beta 28 where the VPN is usable again, however once you go to install something like the Chromium browser, updates/upgrades are applied and after a restart my VPN doesn't connect anymore.

FWIW I use IPVanish.

Thanks in advance for any insight

ghost commented 1 year ago

the basic methods to trace problems are

1) do the equivalent action through the terminal to see the output, it is good to know how everything works in the background and the respective commands

2) run the dmesg command to see any system errors

3) run the journalctl -f command in a terminal before doing the action to see any errors appearing in the journal

ghost commented 1 year ago

you should use the openvpn command, the configuration files should be somewhere into /etc/openvpn

https://openvpn.net/community-resources/how-to/#starting-up-the-vpn-and-testing-for-initial-connectivity

ajsingh007 commented 1 year ago

Thanks for your quick advice @mouffa. I didn't know about the dmesg or journalctl -f commands, so I appreciate learning something new. I took note of the errors when toggling my VPN on like before:

Mar 18 18:33:05 manjaro-arm NetworkManager[3605]: [1679164385.8062] vpn[0xaaab1db421a0,baf2afa0-4e1f-4f53-8cf4-168ace72d4c9,"ipvanish-MX-Guadalajara-gdl-c01"]: starting openvpn Mar 18 18:33:05 manjaro-arm NetworkManager[3605]: [1679164385.8202] audit: failed to open auditd socket: Protocol not supported Mar 18 18:33:05 manjaro-arm NetworkManager[3605]: [1679164385.8204] audit: op="connection-activate" uuid="baf2afa0-4e1f-4f53-8cf4-168ace72d4c9" name="ipvanish-MX-Guadalajara-gdl-c01" pid=3743 uid=1000 result="success" Mar 18 18:33:06 manjaro-arm NetworkManager[6526]: 2023-03-18 18:33:06 WARNING: Compression for receiving enabled. Compression has been used in the past to break encryption. Sent packets are not compressed unless "allow-compression yes" is also set. Mar 18 18:33:06 manjaro-arm NetworkManager[6526]: Options error: Unrecognized option or missing or extra parameter(s) in [CMD-LINE]:1: keysize (2.6.0) Mar 18 18:33:06 manjaro-arm NetworkManager[6526]: Use --help for more information. Mar 18 18:33:06 manjaro-arm NetworkManager[3605]: [1679164386.3831] vpn[0xaaab1db421a0,baf2afa0-4e1f-4f53-8cf4-168ace72d4c9,"ipvanish-MX-Guadalajara-gdl-c01"]: dbus: failure: connect-failed (1) Mar 18 18:33:06 manjaro-arm NetworkManager[3605]: [1679164386.3836] vpn[0xaaab1db421a0,baf2afa0-4e1f-4f53-8cf4-168ace72d4c9,"ipvanish-MX-Guadalajara-gdl-c01"]: dbus: failure: connect-failed (1)

I'm exploring openvpn.net and am currently attempting to connect to the VPN through the command-line. No luck so far, but at least I have the below error message that I can search!

[manjaro@manjaro-arm client]$ openvpn ipvanish-MX-Guadalajara-gdl-c01.ovpn 2023-03-18 18:40:03 WARNING: Compression for receiving enabled. Compression has been used in the past to break encryption. Sent packets are not compressed unless "allow-compression yes" is also set. Options error: Unrecognized option or missing or extra parameter(s) in ipvanish-MX-Guadalajara-gdl-c01.ovpn:17: keysize (2.6.0) Use --help for more information.

ajsingh007 commented 1 year ago

Update for anyone with the same issue:

I was able to connect to my preferred VPN using openvpn in the command line by

  1. Copying two files to the directory /etc/openvpn/client which are "ipvanish-MX-Guadalajara-gdl-c01.ovpn" and "ca.ipvanish.com.crt"
  2. Comment out the keysize line in "ipvanish-MX-Guadalajara-gdl-c01.ovpn" as searching the web indicates it has been deprecated (see also: https://superuser.com/questions/1385043/openvpn-giving-an-error-options-error-unrecognized-option-or-missing-or-extra)
  3. Run the command sudo openvpn ipvanish-MX-Guadalajara-gdl-c01.ovpn

Using ipchicken.com, I can see that my IP is using the VPN, although I didn't notice any changes in the UI of the Manjaro Phose that indicate I'm on the VPN.

In any case, this works for me and hopefully works for others. Thank you again @mouffa for pointing me the right direction!

UPDATE: I found that commenting out the keysize line in the .ovpn file allowed me to use the GUI to connect to my preferred VPN and doesn't require you to use the command-line. Hope that helps!

ghost commented 1 year ago

Nice, it seems that the configuration manager needs some fixing, I don't know what script automatically configures the VPN and inserts the deprecated parametres.

Most of the times you will be able to solve the problem easily. In other cases you have to fix the code and recompile files but it is worth searching because usually the errors have already been reported somewhere else.

The worst case is when you have to understand the whole stack of a feature, the most complicated are the graphics, audio and the modem. Pine64 devices are very effective in learning Linux and hardware through the problems that appear if you have the time for research.

ghost commented 1 year ago

the .ovpn files are provided by the VPN service so there is no problem with the OS, they just provide an older version of the file with deprecated parametres so someone should check manually for similar errors