0

I have a windows xp machine running ubuntu off of virtual box. I have an apache server running on the ubuntu machine. I have already setup the port forward on the virtual machine, so if i go to localhost: 8080 on the windows xp machine that is running the virutal box I can get to the ubuntu server index.html. However when I try it from another computer on the network I can't get to it. I can get to the windows xp server but not the the ubuntu. For example if i do 192.168.1.8:8080 the ip of my windows xp machine, 8080 is what i forwarded the virtual box to. I get a page can' be displayed. Any ideas?

2 Answers 2

1

Mostly like VirtualBox is running in NAT mode and not Bridge mode.

Hence VBox is handing out IP addresses to your VMs.

3
  • I changed it to bridged mode and I can now access the server from any device on the local network however after I set my port forwarding on port 80 to the ip address of the ubuntu server I can't get to it from outside of the network. Any ideas why?
    – Anonymous
    Commented May 3, 2011 at 5:44
  • Port forwarding where? On your router?
    – Devraj
    Commented May 3, 2011 at 6:11
  • 1
    Yes port forwarding enabled on router to be able to access the ubuntu machine from a public ip.
    – Anonymous
    Commented May 3, 2011 at 12:54
1

Either VirtualBox is only listening on the localhost interface instead of the external interface, or there's a firewall on the host which is blocking the connection. As specified in the VirtualBox documentation, you want to configure the port forwarding without specifying the host IP, like this:

VBoxManage modifyvm "VM name" --natpf1 "guesthttp,tcp,,8080,,80"

If you put something like 127.0.0.1 after the second comma then you'll need to delete and recreate the port forward.

If the port forward is correct, check that the Windows firewall is disabled or allows access to port 8080.

0

You must log in to answer this question.