CentOS 8 on virtualbox suddenly stopped connecting to the Internet

centos
virtualbox
Category Software and digital electronics / IT
2023-01-10 04:15

Setup

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?

Answered by robin
2023-01-10 04:37

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.

×

Login

No account?
Terms of use
Forgot password?