VMware Cloud Community
messi1O
Contributor
Contributor
Jump to solution

HTTP issue between vm guest host and local machine

Hi Everyone,

I am having an issue with accessing an HTTP page on my local machine to access an application running over the VM guest host. To magnify the issue, I have recently downloaded the Zabbix monitoring system and it is running perfectly over the VM guest host, but when I try accessing the HTTP page on my local machine's web browser, I am getting the `error connection` page. The httpd service is running on the guest machine. I wonder if I have to change some firewall settings on the VM side? 

0 Kudos
1 Solution

Accepted Solutions
fabio1975
Commander
Commander
Jump to solution

Ciao 

HTTP access from outside the virtual machine could be blocked, so you need to check if the firewall of your VM is configured correctly, I guess the VM is LINUX and Distribution?

For example on Centos you can use the firewall-cmd command, to see which firewall rules are active:

sudo firewall-cmd --list-all

 if you do not see the HTTP service it means that it is not open:

fabio1975_0-1653509512933.png

 

and therefore to open the HTTP port:

firewall-cmd --add-service = http --zone = public --permanent

then

sudo firewall-cmd --reload

and recheck with:

sudo firewall-cmd --list-all

fabio1975_1-1653509608279.png

 

Otherwise it could be the apache that only enabled access from localhost.

Fabio

Visit vmvirtual.blog
If you're satisfied give me a kudos

View solution in original post

0 Kudos
4 Replies
scott28tt
VMware Employee
VMware Employee
Jump to solution

The only firewall in ESXi is for communication to/from ESXi, not to/from VMs and their OSes.

 


-------------------------------------------------------------------------------------------------------------------------------------------------------------

Although I am a VMware employee I contribute to VMware Communities voluntarily (ie. not in any official capacity)
VMware Training & Certification blog
0 Kudos
fabio1975
Commander
Commander
Jump to solution

Ciao 

HTTP access from outside the virtual machine could be blocked, so you need to check if the firewall of your VM is configured correctly, I guess the VM is LINUX and Distribution?

For example on Centos you can use the firewall-cmd command, to see which firewall rules are active:

sudo firewall-cmd --list-all

 if you do not see the HTTP service it means that it is not open:

fabio1975_0-1653509512933.png

 

and therefore to open the HTTP port:

firewall-cmd --add-service = http --zone = public --permanent

then

sudo firewall-cmd --reload

and recheck with:

sudo firewall-cmd --list-all

fabio1975_1-1653509608279.png

 

Otherwise it could be the apache that only enabled access from localhost.

Fabio

Visit vmvirtual.blog
If you're satisfied give me a kudos

0 Kudos
messi1O
Contributor
Contributor
Jump to solution

Hi Fabio, you are a lifesaver. I was trying to find a solution for this problem for four days straight up and contacted Zabbix and Vmware and disabled the firewall on the local machine, but I didn't expect a simple yet helpful answer. Things can be hidden in plain sight in Linux. Big Thank You for your help. 

messi1O
Contributor
Contributor
Jump to solution

Thank You, Scott, for replying. A piece of handy information you shared about ESXi and VMs. 

0 Kudos