Can't access my webserver (that runs inside virtualbox)

3

I've just installed Fedora 14 in VirtualBox and got it up and running in a window on my Windows 7 host.

Its IP is 10.0.2.15 with subnet 255.255.255.0 (ifconfig). The Windows 7 VirtualBox's IP was a bit weird, so I changed it to 10.0.2.20 on the same subnet.

When I then try to open Fedora's IP in Chrome on the Windows 7 VirtualBox host, it can't find the server. Trying 127.0.0.1 on the Fedora box works 100%.

Pinging the server results in 50% loss, so it does seem like "it's there".

Any ideas what might be wrong?

Jason94

Posted 2011-05-03T11:47:21.967

Reputation: 1 125

Answers

5

You're using VirtualBox's NAT feature, right? Try configuring the NIC as "Bridge", then the guest OS gets a "public" IP in your LAN (from DHCP, if available), and is reachable by that address.

Patrick Georgi

Posted 2011-05-03T11:47:21.967

Reputation: 3 436

1

In Virtualbox you can define several kinds of network

  • bridged (the fedora guest will be visible on the external network it will share some physical interface of the host - put in promiscuous mode).
  • NAT, the host will do some port forwarding.
  • Host-only: the guest and the host will share a virtual network.
  • Internal: all guests and the host will share a network.

From your fedora guest IP address it looks like you have selected the NAT type. Try host-only or bridged depending on whether you want the server to be seen only by the host or also outside the host.

Alain Pannetier

Posted 2011-05-03T11:47:21.967

Reputation: 722