[Solved] Bridged networking - SSH works, Apache does not.
Posted: 23. Jun 2010, 04:48
Problem in a nutshell
I cannot connect to the apache server on my guest operating system from my host operating system.
Background
I have a Mac OS X Snow Leopard host running a CentOS 5.5 guest operating system, fresh install on the CentOS (Apache 2, PHP 5.3, MySQL 5.1).
I have the httpd and mysqld services up and running, and from the guest I can browse to localhost and see the web server correctly displaying my PHP index file.
I have two network adapters set up, both Bridged Networking, one is ethernet the other is airport (wireless). Currently I am connected to the internet via the wireless one.
There is a wireless DHCP router on the network. My Macbook Pro is getting 192.168.1.102 assigned to it for an IP, and when I check the IP inside CentOS it shows as 192.168.1.103. All good so far.
From the host OS terminal I can ping 192.168.1.103 and I get a legitimate exchange of packets.
I can also ssh from the command line into 192.168.1.103, and that works. I can browse around the guest OS and see all its files, etc.
However, here is where things break down. When I go to 192.168.1.103 in a web browser on my host, the page can't be found. If I curl from my host OS command line, I get the error: curl: (7) couldn't connect to host
Final Thoughts
Frankly, I'm a bit baffled at this point. I've played around with various things with no luck. The part that confuses me is that ping and SSH work, but trying to hit the apache server does not. Weird. Would it be possible that my apache is somehow not allowing external connections? It's a vanilla install with almost no changes.
Hoping one of you folks might have an inkling what's going on here.
Thanks in advance for your help!
I cannot connect to the apache server on my guest operating system from my host operating system.
Background
I have a Mac OS X Snow Leopard host running a CentOS 5.5 guest operating system, fresh install on the CentOS (Apache 2, PHP 5.3, MySQL 5.1).
I have the httpd and mysqld services up and running, and from the guest I can browse to localhost and see the web server correctly displaying my PHP index file.
I have two network adapters set up, both Bridged Networking, one is ethernet the other is airport (wireless). Currently I am connected to the internet via the wireless one.
There is a wireless DHCP router on the network. My Macbook Pro is getting 192.168.1.102 assigned to it for an IP, and when I check the IP inside CentOS it shows as 192.168.1.103. All good so far.
From the host OS terminal I can ping 192.168.1.103 and I get a legitimate exchange of packets.
I can also ssh from the command line into 192.168.1.103, and that works. I can browse around the guest OS and see all its files, etc.
However, here is where things break down. When I go to 192.168.1.103 in a web browser on my host, the page can't be found. If I curl from my host OS command line, I get the error: curl: (7) couldn't connect to host
Final Thoughts
Frankly, I'm a bit baffled at this point. I've played around with various things with no luck. The part that confuses me is that ping and SSH work, but trying to hit the apache server does not. Weird. Would it be possible that my apache is somehow not allowing external connections? It's a vanilla install with almost no changes.
Hoping one of you folks might have an inkling what's going on here.
Thanks in advance for your help!