unable to access internet from exported vm machine either on nat or bridged
1
vote
0
answers
64
views
**Problem:**
I’m unable to access the internet in my Red Hat 9.5 Enterprise VM, despite the VM having an IP address and being configured in VMware Workstation with NAT mode. The VM's network interface is configured correctly, but I’m unable to ping external websites or resolve DNS addresses.
**Environment:**
VM Software: VMware Workstation
Host OS: Windows [version]
VM OS: Red Hat 9.5 Enterprise
Network Mode: NAT
IP Range: 192.168.50.x
**Additional Context:**
The VM was previously hosted on a vCenter in a private network and has been exported to my local machine for use.
After exporting, I noticed the VM cannot connect to the internet, though it was functioning correctly in the previous environment.
Bridged Mode: When I switch the network mode to bridged, the VM gets stuck at obtaining a DHCP IP address. This might be because my company's network only allows one MAC address per IP, which could prevent the VM from receiving an IP address.
**Details:**
The VM has an IP address in the 192.168.50.x range.
On the host machine, ipconfig shows the default gateway as 192.168.50.1.
On the VM, the default gateway was initially set to 192.168.50.2, which I changed to 192.168.50.1 (matching the host’s gateway).
DNS servers are configured to 8.8.8.8 and 1.1.1.1, but DNS resolution is not working.
The network settings on the host machine and VMware appear to be correctly configured for NAT.
**Steps Taken to Troubleshoot:**
Checked the IP Address and Gateway:
Verified the VM has a valid IP in the correct range.
The gateway was set to 192.168.50.2, which I changed to 192.168.50.1 using ip route, to match the host's gateway.
Checked DNS Configuration:
Verified /etc/resolv.conf has the correct DNS servers (8.8.8.8 and 1.1.1.1).
Restarted the networking service (sudo systemctl restart networking and sudo systemctl restart NetworkManager).
**Tried Pinging:**
Ping to gateway (192.168.50.1): Successful.
Ping to external IP (e.g., 8.8.8.8): Fails.
Ping to domain (e.g., google.com): Fails.
**Checked VMware Settings:**
Verified that VMware’s VMnet8 (NAT) is correctly configured, and it provides the expected IP range and gateway.
**Checked Windows Firewall on Host:**
Temporarily disabled Windows firewall on the host machine.
**Checked Network Interface and Restarted:**
Ensured network interface was up (sudo ifconfig ens192 up).
Restarted both host machine and VM after changes.
**Bridged Mode Issue:**
When I switch to bridged mode, the VM is unable to get an IP address because DHCP is stuck. This could be due to my company's network allowing only one MAC address per IP address.
**Expected Outcome:**
The VM should be able to ping external websites, resolve domain names, and access the internet with the current network configuration.
**Request for Help:**
Could anyone suggest a solution to get internet access in either NAT mode or Bridged mode in this setup?
Asked by jonathan
(11 rep)
Apr 16, 2025, 02:46 PM
Last activity: Apr 16, 2025, 05:43 PM
Last activity: Apr 16, 2025, 05:43 PM