1

I am trying to connect an Ubuntu minimal instance to a VPN. I have installed network-manager-l2tp and have configured the connection as so:

[connection]
id=vpn
uuid=7cb18238-9976-4836-8b7e-ff1ebc60299f
type=vpn
autoconnect=false
permissions=

[vpn] gateway=REDACTED ipsec-enabled=yes ipsec-psk=REDACTED password-flags=0 user=REDACTED service-type=org.freedesktop.NetworkManager.l2tp

[vpn-secrets] password=REDACTED

[ipv4] dns-search= method=auto

[ipv6] addr-gen-mode=stable-privacy dns-search= ip6-privacy=0 method=auto

[proxy]

Following the few other SE posts, I made sure that network-manager was managing my interface.

nmcli dev
DEVICE  TYPE      STATE      CONNECTION
ens3    ethernet  connected  ens3
lo      loopback  unmanaged  --

However, whenever I try to enable the VPN connection, this is the result:

sudo nmcli con up vpn
Error: Connection activation failed: Could not find source connection.

The only other thing I can find is configuring a default route. But since this is the only physical interface, of course it already has a default route.

1 Answers1

0

Looking at the following NetworkManager source code where it outputs the Could not find source connection error you are getting :

the only way it can happen is if the parent connection isn't set which in turn is because priv->primary_connection isn't set. Which seems to indicate NetworkManager doesn't know what the primary connection is for some reason in your case.

For some primary connection debugging, if you run nmcli monitor and then pull out the Ethernet cable, wait a few seconds and then put it back, you should see the following messages amongst others:

  • There's no primary connection
  • 'Wired connection 1' is now the primary connection