Disconnecting shows "Connection failed" (Linux / NetworkManager)
Fix
sudo nano /etc/NetworkManager/conf.d/90-defguard.conf[keyfile]
unmanaged-devices=interface-name:wg*sudo systemctl restart NetworkManagerLast updated
Was this helpful?
When disconnecting from a location on a Linux system with NetworkManager installed, a "Connection failed" system notification appears. This is a visual bug only — the VPN connection itself is not affected.
The error occurs because NetworkManager attempts to manage the WireGuard network interfaces created by Defguard. When those interfaces are removed on disconnect, NetworkManager reports a failure.
Tell NetworkManager to ignore all interfaces created by Defguard. Defguard tunnel interfaces are prefixed with wg by default.
1. Create the config file:
sudo nano /etc/NetworkManager/conf.d/90-defguard.conf2. Add the following content:
[keyfile]
unmanaged-devices=interface-name:wg*3. Save and restart NetworkManager:
sudo systemctl restart NetworkManagerThe notification will no longer appear after this change.
Last updated
Was this helpful?
Was this helpful?