I have a problem with connecting to the wireless network that is configured to automatically connect to VPN. I get an error “A secondary connection of the base connection failed”.
The only workaround I found is to disable the setting to automatically connect to VPN, connect manually to the wireless network, and then connect manually to VPN.
Network manager somehow can not do it automatically. The VPN protocol is Wireguard.
I found similar issue but the solution there didn’t help.
Something similar was already asked on Manjaro forum but no solution was found.
Interesting thing I found in journalctl
:
$ journalctl -u NetworkManager
...
Jul 14 18:28:31 user-laptop NetworkManager[625]: <info> [1657831506.3072] policy: set 'WLANEG' (wlp8s0) as default for IPv4 routing and DNS
Jul 14 18:28:31 user-laptop NetworkManager[625]: <warn> [1657831506.3140] policy: secondary connection 'myvpn-wg' auto-activation failed: The connection is not a VPN.
Jul 14 18:28:31 user-laptop NetworkManager[625]: <info> [1657831506.3140] device (wlp8s0): state change: secondaries -> failed (reason 'secondary-connection-failed', sys-iface-state: 'managed')
Jul 14 18:28:31 user-laptop NetworkManager[625]: <info> [1657831506.3142] manager: NetworkManager state is now DISCONNECTED
Jul 14 18:28:31 user-laptop NetworkManager[625]: <warn> [1657831506.3144] device (wlp8s0): Activation: failed for connection 'WLANEG'
...
I wonder why NetworkManager doesn’t recognize my connection as a VPN? I couldn’t find such issue on the internet.
System:
Manjaro KDE 2022-07-12
KDE Plasma Version: 5.24.6
NetworkManager: 1.38.2-1
Kernel: 5.15.53-1
Why I don't use a VPN app instead
My current ISP blocks some VPN servers, therefore I don’t use a VPN app. Instead I use a Wireguard configuration file to connect to certain servers that aren’t blocked. I must say that with a VPN app I had no issues with autoconnect. Only problem is that it searches really long time for a server that isn’t blocked.