To troubleshoot the issue of not being able to browse the internet in the guest OS (CentOS 9) installed on VMWare Workstation 16 Player using an ISO file downloaded from the official website, follow this step-by-step guide:
-
Check Network Adapter Settings:
- Open VMWare Workstation 16 Player.
- Select the virtual machine running CentOS 9.
- Go to
VM>Settings>Network Adapter 1. - Ensure the network connection type is set to
NAT.
-
Check if the NAT Network is Enabled:
- Go to
VM>Settings>Network Editor. - Make sure the
NAT Networkis enabled.
- Go to
-
Check the Virtual Machine's MAC Address:
- Go to
VM>Settings>Network Adapter 1. - Note down the MAC address.
- Go to
-
Check the Host Machine's Firewall Settings:
- On the host machine (Windows 10), open the Control Panel.
- Go to
System and Security>Windows Defender Firewall>Advanced settings. - In the Windows Defender Firewall with Advanced Security window, click on
Inbound Rules. - Check if there is a rule for the virtual machine's MAC address and ensure it is enabled. If not, create a new rule:
- Right-click on
New Rule, selectPort, thenTCP. - Enter the port number (usually 80 for HTTP and 443 for HTTPS) and click
Next. - Select
Allow the connectionand clickNext. - Select
Domain,Private, orPublic(depending on your network environment) and clickNext. - Enter a name for the rule and click
Finish.
- Right-click on
-
Check the Guest OS's Firewall Settings:
- In the CentOS 9 virtual machine, open a terminal and run the following command to check if the firewall is active:
sudo systemctl status firewalld - If the firewall is active, allow HTTP and HTTPS connections:
sudo firewall-cmd --permanent --add-service=http sudo firewall-cmd --permanent --add-service=https sudo firewall-cmd --reload
- In the CentOS 9 virtual machine, open a terminal and run the following command to check if the firewall is active:
-
Check if the DHCP Client is Running:
- In the CentOS 9 virtual machine, open a terminal and run the following command to check if the DHCP client is running:
sudo systemctl status NetworkManager - If it's not running, start it:
sudo systemctl start NetworkManager
- In the CentOS 9 virtual machine, open a terminal and run the following command to check if the DHCP client is running:
-
Check the IP Address:
- In the CentOS 9 virtual machine, open a terminal and run the following command to check the IP address:
ip addr show - If the IP address is not assigned, try restarting the network service:
sudo systemctl restart network
- In the CentOS 9 virtual machine, open a terminal and run the following command to check the IP address:
-
Test Internet Connection:
- Open a web browser in the CentOS 9 virtual machine and try accessing a website (e.g., google.com).
If the problem persists, ensure that the ISO file is not corrupted and try reinstalling the virtual machine.
References: