-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
command line linux networkmanager ikev2 vpn configuration #1007
Comments
@neothematrix Thanks for sharing your findings with us! |
hello! My system is arrch64_ubuntu16.04 , and there was an error when I used nmcli c up , could you help me analyze it
|
I think you are missing the connection.id parameter just after vpn-type strongswan Also check that nmcli is managing your default connection, otherwise it won't know what connection to tie the VPN session to. |
hello!
I had the need to configure the vpn client on a linux server with no gui, so I couldn't use the Network Manager gui to setup the VPN.
I figured out that it's possible to setup the VPN using just the command line, with the following instruction using a redhat/centos based distro:
first of all, follow the instruction to setup a ikev2 vpn client on linux, then, instead of following the GUI instruction, issue the following command:
sudo nmcli c add type vpn ifname -- vpn-type strongswan connection.id <insert connection name> connection.autoconnect no vpn.data 'address = <insert vpn server address>, certificate = <full path to the extracted ikev2vpnca.cer>, encap = no, esp = aes128gcm16, ipcomp = no, method = key, proposal = yes, usercert = <full path to the extracted vpnclient.cer>, userkey = <full path to the extracted vpnclient.key>, virtual = yes'
you can then start the vpn connection with:
sudo nmcli c up <connection name>
maybe these instructions could be added to the howto, but they might need some testing with other linux clients.
I hope you find this useful!
The text was updated successfully, but these errors were encountered: