why cannot ping 80 port via host only adapter?

Discussions about using Linux guests in VirtualBox.
Post Reply
dorothy kitty
Posts: 2
Joined: 27. Nov 2016, 16:26

why cannot ping 80 port via host only adapter?

Post by dorothy kitty »

I have set virtualmachine vm1:centos 6.4,apache,mysql,without iptables,with host-only adapter,IP192.168.56.102
then I can use other virtualmachine which used host only adapter to ping vm1(192.168.56.102),success.
I also can use my host pc(win7)to ping vm1(192.168.56.102),success.
even I can use SSH to log in vm1 with port 22,but ping 192.168.56.102:22 failed.
when i ping 192.168.56.102:80(apache port), failed.
what's the problem??
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: why cannot ping 80 port via host only adapter?

Post by socratis »

Because you cannot "ping" a specific port maybe?
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
dorothy kitty
Posts: 2
Joined: 27. Nov 2016, 16:26

Re: why cannot ping 80 port via host only adapter?

Post by dorothy kitty »

socratis wrote:Because you cannot "ping" a specific port maybe?
Then, how to browse 192.168.56.102:80,I have not got any example in this site.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: why cannot ping 80 port via host only adapter?

Post by socratis »

You don't have an example on this site, because it's not a problem of this site (or VirtualBox) if you cannot connect to a specific port. The job of VirtualBox is done when you displayed that you can connect to 192.168.56.102 from another VM or your host.

Now, if there is anyone "listening" to port 80 in your VM, that another question and not one for VirtualBox. My thinking is that the configuration of the Apache server is not correct. I remember seeing something that the default Apache configuration allowed only access from 127.0.0.1, the localhost only. Check your Apache configuration.

And if you want a way to test whether a port is open, ping is not the way to do it, since ping works over ICMP, not TCP. Search for "port scan" for your OS.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Post Reply