Setup a L2TP Client with nmcli
Install Dependencies
Create the Connection
Note: Replace
CONNECTION
with desired connection name
Edit the connection with Required Params
Note: In this example, I am not using IPSec. This is a simple L2TP connection with username/password authentication
sudo nmcli connection edit CONNECTION
This will bring you into the nmcli
shell. Use the command ?
for help.
set vpn.data gateway=IPADDRESS,password-flags=0,user=USERNAME,user-auth-type=password
set vpn.secrets password=PASSWORD
The print
command will show you all of the available paramaters. From this, you can infer other values you may need to provide.