How can I troubleshoot Virtualbox port forwarding from Windows guest to OSX host not working?

Posted by joe larson on Super User See other posts from Super User or by joe larson
Published on 2012-01-10T23:10:16Z Indexed on 2012/11/13 17:04 UTC
Read the original article Hit count: 304

Filed under:

There are a plethora of questions about virtual box port forwarding problems but none with my specific details.

I have a Windows install living in Virtual Box, hosted within OSX. I've got several webservers running on localhost on different ports within the Windows install. I cannot for the life of me get port forwarding to work so I can access those webservers from OSX.

My settings look like this (yes I have a NAT adapter):

enter image description here

And in my vbox configuration file the relavent portion looks like this:

<NAT>
        <DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/>
        <Alias logging="false" proxy-only="false" use-same-ports="false"/>
        <Forwarding name="RLPWeb" proto="1" hostport="7084" guestip="127.0.0.1" guestport="7084"/>
        <Forwarding name="UtilWeb" proto="1" hostport="4040" guestip="127.0.0.1" guestport="4040"/>
        <Forwarding name="WCARLP" proto="1" hostport="8084" guestip="127.0.0.1" guestport="8084"/>
        <Forwarding name="WCAUtil" proto="1" hostport="4848" guestip="127.0.0.1" guestport="4848"/>
      </NAT>

I've turned off the Windows firewall to ensure it is not interfering, and I am not running a firewall on OSX.

Anyway, when I attempt to go to for example http://127.0.0.1:4040/ on any of my OSX browsers, it will eventually time out.

The log file for this VM shows that it is correctly reading the settings and implying it's doing the right thing here:

00:00:08.286 NAT: set redirect TCP host port 4848 => guest port 4848 @ 127.0.0.1
00:00:08.286 NAT: set redirect TCP host port 8084 => guest port 8084 @ 127.0.0.1
00:00:08.286 NAT: set redirect TCP host port 4040 => guest port 4040 @ 127.0.0.1
00:00:08.286 NAT: set redirect TCP host port 7084 => guest port 7084 @ 127.0.0.1
00:00:08.290 Changing the VM state from 'LOADING' to 'SUSPENDED'.
00:00:08.290 Changing the VM state from 'SUSPENDED' to 'RESUMING'.
00:00:08.290 Changing the VM state from 'RESUMING' to 'RUNNING'.
00:00:08.337 Display::handleDisplayResize(): uScreenId = 0, pvVRAM=000000012017d000 w=1834 h=929 bpp=32 cbLine=0x1CA8, flags=0x1
00:00:09.139 AIOMgr: Host limits number of active IO requests to 16. Expect a performance impact.
00:00:13.454 NAT: DHCP offered IP address 10.0.2.15

I've tried setting the Host IP to 127.0.0.1, and I've tried setting Guest IP blank and also 10.0.2.15. None of these seem to help.

What else can I look at to troubleshoot this issue?

Details of setup:

  • OSX 10.6.8
  • Windows 7 Professional 64bit
  • VirtualBox 4.1.2

© Super User or respective owner

Related posts about virtualbox