Skip to content

Instantly share code, notes, and snippets.

@magdesign
Created January 25, 2024 13:53
Show Gist options
  • Save magdesign/75b5acacc8a76899f33db29ac8dff1ff to your computer and use it in GitHub Desktop.
Save magdesign/75b5acacc8a76899f33db29ac8dff1ff to your computer and use it in GitHub Desktop.
add a openvpn configuration file in cli

How to add a .ovpn config file via cli in linux:

sudo nmcli connection import type openvpn file vpnfile.ovpn

How to set the username:

sudo nmcli connection modify "${vpnname}" +vpn.data username="${myname}"

How to set password:

sudo nmcli connection modify "${name}" +vpn.secrets password="${PASS}"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment