vpn, ubuntu,

Fix VPN `Connection failed` after upgrade to Ubuntu 22.04

May 21, 2022 · 1 min read · Post a comment

Since the Ubuntu 22.04 version has been released, there were a lot of rumors that there is a big improvement in terms of the Ubuntu style and features, so I decided to upgrade it. After the upgrade, everything was working as expected, until I noticed that the VPN was throwing Connection Failed. It did take me some time to investigate, but finally, I realized how to fix it and wanted to share it with you.

Prerequisites

  • Ubuntu 22.04
  • sudo privileges

Solution

Step 1. Navigate to the following path.

sudo cd /etc/NetworkManager/system-connections/

Step 2. You should be able to find the name of your VPN connection file.

sudo ls -la

Output:

devcoopsvpn.nmconnection

Step 3. Open the file and within the vpn section put a new line under the ca=.

tls-cipher=DEFAULT:@SECLEVEL=0

It should look like this:

[connection]
id=devcoopsvpn
uuid=652551...
type=vpn

[vpn]
auth=SHA256
ca=/home/devcoopsvpn/.cert/nm-openvpn/devcoopsvpn-ca.pem
tls-cipher=DEFAULT:@SECLEVEL=0

Step 4. Save the file and restart the Network Manager daemon.

systemctl restart NetworkManager

Conclusion

For any additional suggestions, don’t hesitate to leave a comment below and if you find this tutorial useful, follow our official channel on Telegram.