Score:-1

WiFi not automatically connected on startup, and no automatic switch between WiFi and ethernet when available

gb flag

I am running Ubuntu 20.04.4 It used to work fine, until 3-4 days ago I installed Cape2 to create a cuckoo sandbox, using this script : https://github.com/doomedraven/Tools/blob/master/Sandbox/cape2.sh

Afterwards, there was an error on startup ("Failed to start Anonymizing overlay network for TCP"), which has to do with tor, so I disabled services that had been installed with cape2.sh, such as tor and suricata

However, now on startup the WiFi (or the ethernet, if plugged in) are not managed properly, since even though I have internet connection, I can not browse nor do anything that requires Internet such as e.g. apt update and upgrade.

The only thing that I can do now is every time run $ sudo dhclient wlp3s0 (this is the name of the WiFi network), or $ sudo dhclient enp0s25 (ethernet) And then I can function normally.

In summary, I would like that the connection to WiFi be automatically done on startup, instead of having to run dhclient every time, and to automatically switch to ethernet if this is connected: i.e. the default behaviour on a fresh ubuntu installation.

I am using an installation of Ubuntu 20.04.4 in a Lenovo Thinkpad T430

Score:-1
gb flag

in the end I enabled and started some services that had to do with networking and that apparently I had disabled, and now it seems to be working properly:

sudo systemctl enable networking.service
sudo systemctl start networking.service

sudo systemctl enable systemd-networkd.service
sudo systemctl start systemd-networkd.service

sudo systemctl enable systemd-networkd.socket
sudo systemctl start systemd-networkd.socket

sudo systemctl enable systemd-network-generator.service
sudo systemctl start systemd-network-generator.service

sudo systemctl enable NetworkManager-dispatcher.service
sudo systemctl start NetworkManager-dispatcher.service

sudo systemctl enable systemd-resolved.service
sudo systemctl enable systemd-logind.service

In case it helps anyone, the networking services I have now enabled on bootup are

$ systemd-analyze blame
...
networkd-dispatcher.service
networking.service
NetworkManager.service
systemd-networkd.service
systemd-networkd-wait-online.service
...
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.