nmcli doesn't allow usage of comma (,) in vpn.data values
I'm trying to create a VPN connection using nmcli, but it won't allow me to set the ipsec-ike property to a list of algorithms. Example:
nmcli connection add \
connection.id my_vpn \
con-name my_vpn \
type VPN \
vpn-type l2tp \
vpn.data " \
gateway = my.gateway.com, \
ipsec-ike = aes256-sha2_256-modp2048,aes256-sha2_256-modp1536,aes256-sha1-modp2048,aes256-sha1-modp1536,aes256-sha1-ecp_384,aes128-sha1-ecp_256,3des-sha1-modp2048"
Output:
Error: failed to modify vpn.data: 'aes256-sha2_256-modp1536' is not valid; use <option>=<value>.
I have tried to put " and ' around the list, but it doesn't help. Whenever I want to send a list of algorithms, it doesn't work, no matter how I format it. If I only use one algorithm, it works:
nmcli connection add \
connection.id my_vpn \
con-name my_vpn \
type VPN \
vpn-type l2tp \
vpn.data " \
gateway = my.gateway.com, \
ipsec-ike = aes256-sha2_256-modp2048"
It seems that nmcli interprets every comma as a new option.
Using nmcli version 1.22.10
The same issue seems to appear when having a comma in your password: https://unix.stackexchange.com/questions/554298/nmcli-how-to-escape-comma-and-other-characters-for-shell-script
Edited by Christoffer Karlsson