1

Working with ubuntu 20.04, upgraded from 18.04 some time ago.

I need to be connected to my companys vpn, so I installed nm-connection-manager and configured my "Wired Connection 1" to always connect to vpn when connected and to automatically connect to "Wired Connection 1" if available. I also noticed a wired connection called "netplan-enp0s34f6", with IPv6 disabled. I deleted this connection.

On the next reboot, the wired "netplan" connection was back, with a slightly different name "netplan-enp0s98d3" or similar, and connected by default.

So I thought: "ok, I use that connection then", configured it to connect automatically to vpn and thought nothing bad.

The next day I booted up my laptop and the "old" "netplan-enp0s98d3" connection was away and a new "netplan-XXX" connection in place, rendering all my "auto vpn connection"-configuration useless.

What is going on? How can I use my "Wired Connection 1" with IPv6 and auto vpn connection all the time?

Why is Gnome creating and dropping network connctions on every boot? Why are they called "netplan-*" ?

How can I disable this behaviour?

Any help appreciated.

mondjunge
  • 3,296
  • 1
    https://unix.stackexchange.com/questions/386162/how-to-set-up-an-usb-ethernet-interface-in-linux https://askubuntu.com/questions/767786/changing-network-interfaces-name-ubuntu-16-04/767796#767796 – pierrely Jan 22 '21 at 05:49

1 Answers1

0

So the problem is/was, that network-manager seems to fully control its automatic created Connections Wired 1 and netplan-XY.

The linked answers from pierrely helped me understand this: Ubuntu only permanently saves changes to a network if it was created explicit by yourself.

The solution is to create a new wired network connection, I did it with nm-connection-manager and called it "My Ethernet connection".

I also checked "connect to this network if available" and "automatically connect to vpn"

Now the connection stays even after reboot and connects to vpn instantly.

Another Problem I ran into, was vpn connection got lost after suspend/hibernate and did not reconnect.

Some other question/answer suggested that I should make my vpn Passwort available for all users and that did the trick. You can do that in System Settings > Network > VPN > Identity , right beside the Password field is an icon where you can set the password to be used by all users.

I hope this helps somebody else. Cheers.

mondjunge
  • 3,296
  • I am still getting new names coming up when it spits the dummy, for instance if I so much as put in alt dns into etho (or my newly created one as your describe) it makes a new connection, even if a second one with the same name this time with the same mac address . "it is the ubuntu way". I am a single user here. back to the drawing bored(sic). perhaps I should uninstall the whole network manager and reinstall it. – pierrely Feb 18 '21 at 06:06
  • I did have my custom connection not set to automatic, which WAS my preference, but NM decided to make a new one(s) with auto... so I have settled to automatic and it seems content with that . (I am still getting a notification for vpn password, even though it has connected ok. "it is the ubuntu way".. and so it goes on.. vpn DID disconnect after minutes, AND of course NM made a new eth0 connection / best stop here or move myself to chat/whinge. (I see, my nordvpn client is taking over, when I set ethernet to not use it, it put it in, as I had set the terminal application settings to do. – pierrely Feb 18 '21 at 06:36