setup vpn connection using nmcli - Connection activation failed: No valid secrets
2
votes
0
answers
478
views
I'm trying to configure an openconnect VPN connection in
nmcli
on a Debian 12 running SwayWM. I manage to connect to the vpn using nmcli
with the --ask
flag but it cannot read vpn secrets provided with the configuration file below. Any idea?
[connection]
id=VPN
uuid=d9133c7c-1c0e-47dc-8da1-9e52eced6385
type=vpn
autoconnect=false
timestamp=1726496682
[vpn]
authgroup=Personels
authtype=password
autoconnect-flags=0
certsigs-flags=0
cookie-flags=2
enable_csd_trojan=no
gateway=vpn.grenet.fr
gateway-flags=2
gwcert-flags=2
lasthost-flags=0
password-flags=0
pem_passphrase_fsid=no
prevent_invalid_cert=no
protocol=anyconnect
resolve-flags=2
stoken_source=disabled
user-name=myusername
xmlconfig-flags=0
service-type=org.freedesktop.NetworkManager.openconnect
[vpn-secrets]
#form:main:group_list=TunnelGroup_Personnels
#form:main:username=myusername
password=mypassword
I tried nmcli con reload
, systemctl restart NetworkManager
. I also tried using 'passwd-file' without success.
Also journalctl
logs :
> [1726513110.5164]
> vpn[0x55c2cb4b6330,d9133c7c-1c0e-47dc-8da1-9e52eced6385,"VPN"]:
> secrets: failed to request VPN secrets #3: No agents were av> lines
> 751-800/800 (END)
Duplicate unanswered posts :
- https://serverfault.com/questions/816714/how-do-i-supply-a-password-to-networkmanager-openconnect-automatically
- https://unix.stackexchange.com/questions/703089/how-to-set-a-vpn-connection-in-nmcli
Asked by charlycou
(121 rep)
Sep 16, 2024, 07:21 PM