I have installed a CentOS 8 on a VirtualBox. The virtual is configured to connect my wifi to the guest via NAT.
It was working for a while but suddenly stopped connecting anymore.
The ping to a public website
ping google.com
does nothing. And does not generate any output either.
How can I fix this?
Every time you switch the network adaptor on virtualbox setting, you need to disconnect and connect the network from CentOS side too
sudo nmcli con show sudo nmcli con down enp0s3 sudo nmcli con up enp0s3
Replace enp0s3
with the network type show to you in your list.