I want to configure a ip-sec VPN connection from nmcli
because it runs on Ubuntu 20.04 Server without X Server.
I already have a connection file on another machine, so at the end of the process I would be able to check the if the configuration is ok:
[connection]
id=myVPN
uuid=blabla-blabla-blabla
type=vpn
autoconnect=false
permissions=user:mark:;
[vpn]
IKE DH Group=dh2
IPSec ID=myID
IPSec gateway=myGateway
IPSec secret-flags=1
Local Port=0
NAT Traversal Mode=natt
Perfect Forward Secrecy=server
Vendor=cisco
Xauth password-flags=1
Xauth username=myUser
ipsec-secret-type=save
xauth-password-type=save
service-type=org.freedesktop.NetworkManager.vpnc
[ipv4]
dns-search=
method=auto
[ipv6]
addr-gen-mode=stable-privacy
dns-search=
method=auto
[proxy]
Reading the docs here and here, I'm trying to compose the correct command:
sudo nmcli connection add connection.id myVPN connection.type vpn connection.autoconnect false connection.permissions mark vpn.data {"IKE DH Group"="dh2" "IPSec ID"="myID" "IPSec gateway"="myGateway" "IPSec secret-flags"="1" "Local Port"="0" "NAT Traversal Mode"="natt" "Perfect Forward Secrecy"="server" "Vendor"="cisco" "Xauth password-flags"="1" "Xauth username"="myUser" "ipsec-secret-type"="save" "xauth-password-type"="save" } vpn.service-type=org.freedesktop.NetworkManager.vpnc
but I get the following error:
Error: invalid <setting>.<property> 'IPSec ID=myID'
So I guessed it wants the .
instead of the =
. Now it complains the opposite:
Error: failed to modify vpn.data: '{IKE DH Group.dh2' is not valid; use =
What is the correct syntax to configure such a VPN connection?