Skip to content

Instantly share code, notes, and snippets.

@thiagozs
Created June 19, 2024 18:55
Show Gist options
  • Save thiagozs/4d8c6e090a027fae3dd883163615f91e to your computer and use it in GitHub Desktop.
Save thiagozs/4d8c6e090a027fae3dd883163615f91e to your computer and use it in GitHub Desktop.
AWSVPNClient Fixes on ubuntu 24.04

Steps

Download

wget http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb

sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2.13_amd64.deb

Edit files and add Env vars

sudo vim /etc/systemd/system/awsvpnclient.service

Put the Enviroment line

[Service]
Type=simple
ExecStart=/opt/awsvpnclient/Service/ACVC.GTK.Service
Restart=always
RestartSec=1s
User=root
Environment=DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1

[Install]
WantedBy=multi-user.target

Create a simbolic link

cd /opt/awsvpnclient 

/opt/awsvpnclient  …
➜ sudo ln -s AWS\ VPN\ Client awsvpnclient  

Edit the menu

find / -name 'awsvpnclient.desktop' 2>&1 | grep -v 'Permissão negada'

/home/thiagozs/.local/share/applications/awsvpnclient.desktop
/usr/share/applications/awsvpnclient.desktop

Put this content here.

[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=AWS VPN Client
Comment=AWS VPN Client
Exec=/opt/awsvpnclient/awsvpnclient %U
Path=/opt/awsvpnclient
Icon=acvc-64
Terminal=false
Categories=Network;VPN;
Keywords=vpn;aws;
@amunro-tsl
Copy link

Works on Mint 22 (ubuntu 24.04 based). Thanks @thiagozs !

@spicysomtam
Copy link

So @thiagozs changes worked for me on my main Linux Mint 22 desktop. However for another desktop, which I access remotly using NoMachine, it did not work for me (also tried @kumaran8888 suggestion). This was the fix for this; embedding the env var in the desktop file. Basically the env var was not picked up from ~/.bashrc, ~/.profile, /etc/profile, etc:

$ cat /usr/share/applications/awsvpnclient.desktop
[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=AWS VPN Client
Comment=AWS VPN Client
Exec=env DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1 /opt/awsvpnclient/awsvpnclient %u
Path=/opt/awsvpnclient
Icon=acvc-64.png
Terminal=false
Categories=Network;VPN;
Keywords=vpn;aws;

@thiagozs
Copy link
Author

That's nice! Thanks a lot for all.

@sortafreel
Copy link

Thank you a lot, helped on Linux Mint 22 also 🙌

@dmirandaa
Copy link

Thank you, worked on Ubuntu 24.04 @spicysomtam solution.

@syedzahed
Copy link

syedzahed commented Aug 22, 2024

Thanks @spicysomtam. That helped (ubuntu 24.04)

@dwilches
Copy link

Thanks! It worked for me with Ubuntu 24.04 as well. I had to use the env command in the desktop file, and do %u instead of %U, but other than that, it worked perfectly.

@ferchor2003
Copy link

ferchor2003 commented Sep 6, 2024

Thanks! The solution worked as described.

However after a recent apt upgrade the VPN suddenly stopped working. I did not keep a log of the updated packages though, but I see that the client shows Version 3.15.1
The app launches, but after hitting the "Connect" button a popup window shows with "Unknown error ocurred. Try Again".
Any ideas on what to look for?

@ferchor2003
Copy link

Thanks! The solution worked as described.

However after a recent apt upgrade the VPN suddenly stopped working. I did not keep a log of the updated packages though, but I see that the client shows Version 3.15.1 The app launches, but after hitting the "Connect" button a popup window shows with "Unknown error ocurred. Try Again". Any ideas on what to look for?

I found that after going back to 3.15.0 it works again!
You can download older versions at https://docs.aws.amazon.com/vpn/latest/clientvpn-user/client-vpn-connect-linux-release-notes.html

@jannel-cloubi
Copy link

This worked for me...I have the latest AWS VPN version and Ubuntu 24.04.1 LTS

wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb
sudo dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb

@varfrog
Copy link

varfrog commented Sep 10, 2024

We should appeal to AWS to make the VPN client supported on Ubuntu 24. I have filled out a support ticket. In the reply they said they are working on it but they did not specify an ETA. I did not understand whether that meant "actively working on it", or just "it's it's the backlog" kind of progress. Has anyone else conversed with AWS regarding this?

@aadit-panta
Copy link

aadit-panta commented Sep 24, 2024

@varfrog is their any update from aws side in your support ticket? It has been two weeks. Can you share link to your support ticket?

@jannel-cloubi aren't you facing the issue of "Unknown error ocurred. Try Again".

@aadit-panta
Copy link

aadit-panta commented Sep 24, 2024

@ferchor2003 I also downgraded aws vpn clinet to version 3.15.0 from version 3.15.1, still I am getting "Unknown Error Occurred" error message.

Here is the log message that is saved to the log file located at:- /home/username/.config/AWSVPNClient/

Tmds.DBus.ConnectException: Connection refused �awsvpnclient ---> System.Net.Internals.SocketExceptionFactory+ExtendedSocketException (111): Connection refused �awsvpnclient at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.Sockets.Socket.Connect(EndPoint remoteEP) at System.Net.Sockets.Socket.UnsafeBeginConnect(EndPoint remoteEP, AsyncCallback callback, Object state, Boolean flowContext) at System.Net.Sockets.Socket.BeginConnect(EndPoint remoteEP, AsyncCallback callback, Object state) at System.Net.Sockets.Socket.ConnectAsync(EndPoint remoteEP) at System.Net.Sockets.SocketTaskExtensions.ConnectAsync(Socket socket, EndPoint remoteEP) at Tmds.DBus.Transports.TransportSocket.ConnectAsync(EndPoint endPoint) at Tmds.DBus.Transports.TransportSocket.ConnectUnixAsync(AddressEntry entry, CancellationToken cancellationToken, Boolean supportsFdPassing) at Tmds.DBus.Transports.Transport.ConnectAsync(AddressEntry entry, ClientSetupResult connectionContext, CancellationToken cancellationToken) at Tmds.DBus.DBusConnection.ConnectAsync(ClientSetupResult connectionContext, Action1 onDisconnect, CancellationToken cancellationToken)
at Tmds.DBus.Connection.DoConnectAsync()
--- End of inner exception stack trace ---
at Tmds.DBus.Connection.DoConnectAsync()
at Tmds.DBus.Connection.ConnectAsync()
at ACVC.Core.OpenVpn.OvpnGtkServiceClient.StartVpnAsync(String[] ovpnConfigFileContents, String[] managementPortPasswordFileContents) in /home/ubuntu/Jenkins/workspace/GtkBuild/SecureConnectClient/ACVC.Core/OpenVpn/OvpnGtkServiceClient.cs:line 24

`

Have you figured out any solution for this? Is it working fine for other in Ubuntu 24.04.1?

@varfrog
Copy link

varfrog commented Sep 24, 2024

@varfrog is their any update from aws side in your support ticket? It has been two weeks. Can you share link to your support ticket?

It is a private support ticket. I've created 3 tickets so far, they seem to be sending a template answer, saying there's no ETA. And the wording is so that I can't figure out if the thing is in progress or not

@thiagozs
Copy link
Author

thiagozs commented Sep 24, 2024

@ferchor2003

Try see this issues.

1 - DBus service is not running: DBus is an inter-process communication (IPC) system that many applications on Linux use for communication. If the service is down, the AWS VPN client may not be able to communicate with other necessary system components.

2 - Firewall/Network issues: The VPN client could be trying to connect to a blocked or incorrect endpoint.

3 - VPN service is not started: The VPN service might not be running, or the configuration files could be incorrect.

4 - Incorrect socket configuration: The socket connection to the DBus or VPN management service may be misconfigured, leading to the connection refusal.

@NicolasBohorquez
Copy link

Hi, @ferchor2003 :

I got it working by installing the dbus-x11 package and restarting.

@d-hancharou
Copy link

nano ~/.profile

Add:

export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1

@Kardouna
Copy link

Kardouna commented Oct 16, 2024

i still get this error using ubuntu 24

Screenshot from 2024-10-16 11-05-10
Screenshot from 2024-10-16 11-05-10

desktop file did not specify exec field

@dmirandaa
Copy link

I had to downgrade to version 3.13.0 to works, removed aws from apt list and not planning to update.

@babichmaxim
Copy link

Hello. I solved this issue with add Exec=env DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1 /opt/awsvpnclient/AWS\ VPN\ Client %u
in "/usr/share/applications/awsvpnclient.desktop"

@varfrog
Copy link

varfrog commented Oct 16, 2024

Is anyone interested in running a VM for the VPN client, and route traffic through the VM? I have a few ways to set that up and can share some updated scripts.

@Davidster
Copy link

@aadit-panta I am getting the same issue as you even after installing version 3.15.0. did you have any luck finding a fix?

@Davidster
Copy link

@aadit-panta actually I was able to fix the issue by following these instructions 🎉

@reiakvam
Copy link

Got it working with ubuntu 24.04 and v 3.12.0 after a reboot.

@mrbeiertz
Copy link

mrbeiertz commented Nov 13, 2024

The service runs, but I can't see the UI when clicking on the AWS icon. However, after a reboot, it worked.

@varfrog
Copy link

varfrog commented Nov 13, 2024

Ubuntu 24.04 is now supported. At last!

image

@mrbeiertz
Copy link

It would be nice to provide an update to this guide to undo what we did here, for those that don't know how to do it, now that there is official support for it.

@mrbeiertz
Copy link

This is what I did:

# check if libssl1.1 has any dependencies
sudo apt-cache rdepends libssl1.1
sudo apt-get remove --purge libssl1.1
sudo apt update
sudo apt autoremove
sudo apt autoclean
sudo apt-get remove --purge awsvpnclient
ls -l /opt/awsvpnclient
sudo rm -rf /opt/awsvpnclient/awsvpnclient
sudo rm -rf /opt/awsvpnclient/ConnectionInfoFiles
sudo systemctl status awsvpnclient

Then follow the instructions on AWS to install AWS VPN 4.1+

@Ruhshan
Copy link

Ruhshan commented Nov 25, 2024

Using Ubuntu 24.04.1 LTS

Hi @mrbeiertz , just saw your comment and then realized that 4.1 is out now! Thanks a lot!

I followed your instruction to uninstall the old version then installed the new version from here.

Thought this time installation, starting and connection was without any hassle, but I was still unable to access the private resource. Then I looked into the logs and found this error

/opt/awsvpnclient/Service/Resources/openvpn/configure-dns: line 24: systemd-resolve: command not found

I have to create a symbolic link named systemd-resolve that points to resolvectl.

sudo ln -s /usr/bin/resolvectl /usr/bin/systemd-resolve

These additional steps got the vpn client working on ubuntu machine.

@unigazer
Copy link

unigazer commented Apr 23, 2025

The AWS VPN Client is now officially available for Ubuntu 24.04. If you are still experiencing issues, you can follow the official troubleshooting process.

I had an issue with the DNS, and just by adding one line of instruction in the OpenVPN configuration file, I was able to connect to the private resource.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment