0

I installed Ubuntu (as a virtual machine using virtual box) with the openssh server option and apache.

When I do ps -ef | grep apache I see apache is running. But:

  • I can't connect to the server from the browser (for example http://192.168.1.8)
  • I don't see the new server on my router's list of connected devices
  • I can't putty to that ip address (connection time out)

I set the ip address by doing vi /etc/network/interfaces then changed

  • dhcp to static
  • added address 192.168.1.8 the next available number on my router's list of connected devices
  • added netmask 255.255.255.0
  • added gateway 192.168.1.1 my router's ip address

I then did vi /etc/resolv.conf and changed it to:

  • nameserver 192.168.1.1 my router's ip address
  • domain left it blank
  • search left it blank

I then did /etc/init.d/networking restart

What could be the problem. I would expect the server to be able to register itself on the router and be connectable from the browser at its ip address. But something's not wokring. Anyone can spot it? or some advice on what I can do to troubleshoot this. I just new to ubuntu and linux.

1 Answers1

1

Is your VM configured to be in bridged mode? If not, change it to bridged mode so that your VM will appear as just another machine on your network.

Convict
  • 1,613
  • 10
  • 8
  • Thanks for the hint. Does this tutorial look like what I'm supposed to do? `http://www.reflectiv.net/blog/how-to-setup-a-bridge-between-a-virtual-machine-with-virtualbox-and-a-fedora-host/` It's a Fedora tutorial, while I'm using Ubuntu. Would that make a difference? I mean will the commands still work just the same? –  Jul 25 '10 at 11:26
  • What is your host OS? Use the VirtualBox GUI to set the networking mode of your Ubuntu VM to bridged mode. You should not need to change the network configuration in your Ubuntu VM if your router is also acting as a DHCP server. – Convict Jul 26 '10 at 11:54