I am not allowed to run my VMWare guest in bridged mode, and I want to somehow tunnel from an agreed port on the Mac's external network interface to the webserver running on the VMWare fusion guest.

My guess is that I can somehow set up a tunnel in the ipfw running on the Mac to support this.

Can anyone give me some pointers please ?

closed as off-topic by Michael Hampton Jul 29 '14 at 15:46

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions must be relevant to professional system administration. Server Fault is dedicated to professional system and network administrators. End user and enthusiast questions are off-topic (contact your system administrator or hire a professional to help you out). Please see the Help Center for more information." – Michael Hampton
If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 2 down vote accepted

Disclaimer I haven't tried this but this is for workstation but I believe it should work

If you are running a virtual machine on your computer, you may want to access that virtual machine from another computer. Let’s use an example: Say you have an Ubuntu virtual machine with Apache running on port 80, and you want to show other people on your network to access the website you are hosting.

We’re going to assume that the virtual machine is using NAT, and has been assigned an IP address of

First open the Manage Virtual Networks start menu item:

alt text

Click on the NAT tab, and then click on Edit. You will see the NAT Settings dialog:

alt text

Click the Port Forwarding button, and you will see this dialog: alt text

Now we are finally on a screen we can actually use. We’re going to use port 8080 on the host machine. We enter the ip address for the ubuntu virtual machine, and port 80. These ports could be any ports. alt text

We should be able to test this out by going to http://localhost:8080 on our host pc. We can give out the url to our host machine by replacing localhost with the host computer IP address.


If you're using NAT, the VM is behind a host level NAT address (172.x.y.z) that your Internet router knows nothing about. You could forward port 80 from the router to your host's IP, then configure /Library/Application Support/VMware Fusion/vmnet8/nat.conf to port forward port 80 requests to your VM's 172 address on port 80. This requires turning off Apache on OS X, if it's running because that would cause a port conflict.

Your other option, is to change the VM from NAT to bridged, in which case your OS X and your Ubuntu VM would be on same subnet with DHCP address handed out by the Internet router. The router would be forwarding traffic directly to the VM without any additional port forwarding.

  • Thanks - this is exactly what I want to do, but I cannot find these options on VMWare Fusion. – Martin Oct 19 '10 at 9:15
  • I will try changing nat.conf as you suggest and see how far that gets me. Thanks again. – Martin Oct 19 '10 at 10:20

I was looking to do the same on OSX (more specifically, allow phones/tablets/devices/people to access my VM for testing purposes) and the following worked perfectly:

My setup:

Host OSX IP:


1) Select “NAT” in “Network Adapter” settings on VMWare Fusion

2) cd to the vmnet8 directory

    cd /Library/Application\ Support/VMware\ Fusion/vmnet8/

Note: If you can't find the vmnet8 directory, try running locate nat.conf, which is usually where the file resides.

3) Edit the nat.conf file (using vim/vi etc) and underneath [incomingtcp], enter the following:

    EG: <external port number> = <VM’s IP address>:<VM’s port number>

In my case, I entered:

    8080 =

4) Save and exit the nat.conf file

5) Reboot VMWare networking by running:

    /Library/Application\ Support/VMware\ Fusion/boot.sh --restart

Upon running boot.sh, all tcp traffic to port 8080 on your OSX host machine will be immediately forwarded to destination port 80 of the virtual machine with IP and make your VM available to your local network on

Note: If you're already running a webserver on OSX, conflicts might occur on port 80, so use 8080 (as I've shown here) or other port to avoid problems.

  • On my system I can't find vmnet8, did they remove it in later versions of Fusion? – jnthnclrk Mar 18 '13 at 14:03
  • Just found it in /Library/Application\ Support/VMware\ Fusion/vmnet8/ – jnthnclrk Mar 18 '13 at 14:19
  • @trnsfrmr Not aware if it's moved in latest versions... You could always locate nat.conf to see exact location. Will update my answer. – nickhar Mar 18 '13 at 15:10
  • 3
    Just an FYI - on Fusion 6.0.4, location of nat.conf is different /Library/Preferences/VMware Fusion/vmnet8/nat.conf – user235083 Jul 29 '14 at 14:14

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