2

I am getting desperate here. I need to connect a Ubuntu Server Machine on a VPS to a network to monitor several machines. I can only connect to the network with L2TP over IPsec.

I have tried installing the GUI on the Ubuntu Server, changing Netplan to use Network Manager as renderer, but this way I can't manage to get the VPN connection starting automatically on boot. I cannot start the GUI tool sudo nmcli-connection-editorfrom VNC because it fails to start a GUI applet with privileges. The only option I have found is to use nmcli editor over ssh with sudo nmcli c edit netplan-01-eth0 and trying to set the connection.secondaries value to the UUID of the "myvpn" connection.

This doesn't work as rebooting the VPS just removes the value of connection.secondaries back to an empty value.

I need a solution to keep the VPN always up, regardless of disconnections from the VPN Server (similar to DPD in Strongswan) and to reboot.

I would love to use strongswan, but I cannot make swanctl to work.

3
  • netplan overrides any settings changes you make in NetworkManager. If you intend to configure your network with NetworkManager, then disable and remove netplan. Feb 16, 2021 at 1:34
  • Thanks for your answer, @MichaelHampton ! Is there a way to configure an L2TP over IPSEC VPN with Netplan? What exact setup would you recommend for this case?
    – Javi Hache
    Feb 16, 2021 at 10:48
  • Ok, I have just deleted all data regarding the connection in 01-netcfg.yaml and just left the version and renderer keys. Now on restart the VPN gets connected. I think I have finally understood the logic behind this whole netplan, networkd, networkmanager... etc...
    – Javi Hache
    Feb 16, 2021 at 14:13

0

You must log in to answer this question.

Browse other questions tagged .