Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
share|improve this question
    
I don't think you need to set the guest IP unless you have assigned a static IP to the guest so leaving it blank is probably right. –  BJ292 Mar 16 '13 at 21:45

1 Answer 1

I have noticed problems with port forwards on OSX VirtualBox host.

Using network adapter PCnet-Fast III (Am79C973) and Oracle Developer Day image as guest.

When ever I suspend the guest and resume it all port forwards are lost.

I am not certain if the problems are related to the network adapter or to the guest but I fail to see how the guest could be aware of the port forwards.

This is a long shot, but if you have anything in common with this case, try shutting down (complete power off of the guest) and starting up with the port forwards set. Immediately test if any of the port forwards work and only after positive results try suspending and resuming the guest.

share|improve this answer
    
I have tried exactly what you suggest, sadly there is no difference in behavior. –  jlarson Feb 9 '12 at 17:52
    
Have you tried adding 0.0.0.0 as the host ip in NAT settings? –  PeteS Feb 10 '12 at 10:45
    
Yes, I did try that. –  jlarson Feb 10 '12 at 14:56

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.