Score:0

Network access (ssh and ping) lost when logged out

cn flag

My host (5.4.0-97-generic Ubuntu 20.04.3 LTS) responds to ping and allows ssh when my user is logged in, remotely or locally. However, if I restart or log out all user sessions, I lose ssh access and it no longer responds to ICMP requests.

This behaviour started a few weeks ago after I remotely updated and restarted the host. I used to be able to login without any users logged in. I have since come back to the office and installed more updates, but the problem persists.

My firewall is set to public mode (I have a public IP) and explicitly allows SSH.

I tried specifying the IP settings (auto settings) as answered in this question but it didn't work after restarting.

# interfaces(5) file used by ifup(8) and ifdown(8)
auto eth0
iface eth0 inet dhcp

My public IP is semi-static.

Here is the output of /etc/netplan/*.yaml

# Let NetworkManager manage all devices on this system
network:
  version: 2
  renderer: NetworkManager

Here's what Network Manager has: enter image description here enter image description here

Thomas Aichinger avatar
cn flag
can you show us your netplan configuration. /etc/netplan/*.yaml
Glubbdrubb avatar
cn flag
I added what you wanted :-)
Thomas Aichinger avatar
cn flag
I recommend to stop network manager and set in place a real netplan yaml file. Here you can find some examples https://wiki.ubuntuusers.de/Netplan/
Glubbdrubb avatar
cn flag
That did the trick. Would you like to answer the question? Or should I answer it myself with the netplan yaml I used? I am disappointed that NetworkManager changed it's behaviour after an update though.
Score:1
cn flag

I would recommend to use a netplan yaml file with renderer networkd.

Here is the default after installation.

01-netplan.yaml

# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
  version: 2
  renderer: networkd
  ethernets:
    ens32:
      dhcp4: yes
      dhcp6: yes
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.