Re: web server and IP address

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Alain Roger writes:

Hi,

i installed Fedora 13 in  my virtualBox.
under F13 i installed Apache 2, PHP and MySQL to have a test server for my Joomla development. everything works perfectly in local (directly under F13) but if i try to access to my web page from another computer - my host OS for example - it does not find the web page.
i can ping without problem my F13 (guest) from my Win7 (host).
it's like the web page is not accessible from outside local computer.
in my local OS (F13) i can use localhost/test.php (for example) as normal IP (for example: <URL:http://192.168.1.30/test.php>192.168.1.30/test.php)

any idea why i can not access it from outside using <URL:http://192.168.1.30/test.php>192.168.1.30/test.php ?

Most likely because your routing is not configured correctly. Your correct routing configuration depends on a number of factors that you have not stated: whether or not your win 7 host is bridging/multihosting your guest's IP address on the host's external network interface, or whether your win 7 host has this guest set up as a virtual subnet.

Based on your ping test, I suspect that you have your guest on a virtual subnet; if it was multihomed I can't think of any reason the external ping would fail if the ping from the host works.

Presuming that your guest is on a virtual subnet, your routing needs to reflect that accordingly. Presumably, Win 7 has enough brains to understand that IP packet forwarding needs to be enabled in the host, if not you'll need to enable it somewhere in Win 7's networking configuration. That's the necessary first step, in any case.

Then, you need to know what your Win 7 host's virtual IP address on the virtual subnet, and its real IP address on the external network interface, then configure all other hosts on your external LAN that IP traffic for 192.168.1.0/24 needs to be routed to your Win 7 host's external IP address. This doesn't happen by magic, this must be set up as a static route. There's no mechanism by which all other machines on your network can automatically discover that some random server on your network now has a virtual machine running with a virtual IP address, so the IP address for that IP address needs to be routed through the host, as if it was a real router.

There's also a small possibiloity that you need to have your F13 guest's network configuration fixed. I don't think it's likely, since pinging from the host works. Your F13 must have your Win 7 host's virtual IP address as its router, and the appropriate netmask for the virtual network interface. This can be done in System → Administration → Network. Select the virtual network interface, and click edit, if you have static IP addressing enabled, first try switching to DHCP and restarting, and seeing if Win 7 will act as a functional DHCP server on the virtual subnet, configuring your F13 host automatically; if not, switch to static IP address configuration, specify the correct address, subnet, and the Win 7 host's virtual IP address in the "default gateway address" field.

All of the above presumes that you have your virtual guest on a virtual subnet. If it's supposed to be bridged/multihomed on your host's external network interface, and 192.168.1.0/24 is your external subnet, then something else is wrong.

Attachment: pgpDydNaSDhX2.pgp
Description: PGP signature

-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux