VMware Communities
kevinstruckhoff
Contributor
Contributor
Jump to solution

Port 80 not open in NAT or Bridged Mode

Hi,

I have WPlayer 16 running on my Win 10 Pro laptop with a CentOS 8 VM. I can access the VM using putty, WinSCP, and the CentOS 8 web client on port 9090 in either NAT or Bridged mode. Currently, I've hard-coded the VM IP number to the apache httpd.conf file:

 

/root>netstat -tlpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1/systemd
tcp 0 0 192.168.42.128:80 0.0.0.0:* LISTEN 2191/httpd
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 996/sshd
tcp6 0 0 :::111 :::* LISTEN 1/systemd
tcp6 0 0 :::22 :::* LISTEN 996/sshd
tcp6 0 0 :::443 :::* LISTEN 2191/httpd
tcp6 0 0 :::9090 :::* LISTEN 1/systemd
/root>

However that and just the default of Listen 80 doesn't work.

How do I allow my Win 10 host web browser access to Port 80 on my VM?

Thanks.

Kevin

 

Reply
0 Kudos
1 Solution

Accepted Solutions
RaSystemlord
Expert
Expert
Jump to solution

Very good then. As for disappearing - maybe it was the name resolution, my first item in the list, which does get working over time.

View solution in original post

Reply
0 Kudos
5 Replies
RaSystemlord
Expert
Expert
Jump to solution

I have routinely used NAT VMs to work as IIS servers with other VMs. So, there is no limitation in VM not to allow port 80 traffic (with version 15.x or earlier, not done it since that).

In your case, I would check the following:

- perhaps far-fetched based on your description, but the HOST DNS functionality gets confused with VM copies, which they often are. Thus, the VM node name might not work, initially at least. You can overcome this by editing on the Windows-side /etc/hosts file to include the tcp/ip-name resolution. A Windows reboot is required in order to get that to work (ping works without a reboot, don't get fooled). You don't need to do it on the VM, which a VM always "knows" its Host

- I don't know CentOS, but isn't it the idea that server ports are NOT open in Linux before you open them? Have you done that in CentOS ... you said you have Apache there, but still? I cannot deduct from your listing, but do you need to double-check this in CentOS?

- you asked also what to do on Windows? Not sure if this was the intent. However, in Windows you need to configure Firewalling and probably reboot after that. Not sure why this is necessary, if you can access Internet on your NAT VM computer ... by default it works without any reconfiguration of the Firewall. Or perhaps you need to reconfigure something else which you might have installed on Windows, like a Virus scanner which may have kind-of stealth firewalling and can start to work incorrectly, seen that happening.

Reply
0 Kudos
kevinstruckhoff
Contributor
Contributor
Jump to solution

Thanks. The problem disappeared overnight. It's working today. Maybe the reboot of my laptop fixed something because I didn't have to make any changes to the host or guest VM.

Reply
0 Kudos
RaSystemlord
Expert
Expert
Jump to solution

Very good then. As for disappearing - maybe it was the name resolution, my first item in the list, which does get working over time.

Reply
0 Kudos
kevinstruckhoff
Contributor
Contributor
Jump to solution

OK well I started a new VM in Bridged mode and this one didn't open port 80. However, I found the commands to use for CentOS 8:

firewall-cmd --add-service=http --permanent
firewall-cmd --reloadgust

Works fine now.

Now I need to figure out to make a static IP on the guest work.

Reply
0 Kudos
RaSystemlord
Expert
Expert
Jump to solution

OK, good to know. As for the "static issue", I answered to your other thread. I hope that works for you.

Reply
0 Kudos