machine icon indicating copy to clipboard operation
machine copied to clipboard

VMware Fusion Port Forwarding

Open chouclee opened this issue 11 years ago • 8 comments

Anyone knows how to do port forwarding via docker machine?

I need to let other computers access the web services I deployed in containers. So only port forwarding could work.

Virtual Box could do that, but the shared folder performance is just super slow.

chouclee avatar Jun 12 '15 03:06 chouclee

We currently don't have a mechanism in place in machine to do this. You would have to use the Fusion UI. We've discussed port forwarding for local and it's getting more and more request. We should put together a formal proposal to do this for local providers.

ehazlett avatar Jun 12 '15 16:06 ehazlett

+1

adambiggs avatar Jun 20 '15 00:06 adambiggs

+1

Pixelworlds avatar Jul 03 '15 19:07 Pixelworlds

+1

rguikers avatar Jul 24 '15 08:07 rguikers

+1

thinktainer avatar Sep 21 '15 20:09 thinktainer

+1

mikattack avatar Sep 26 '15 15:09 mikattack

+1

You can manually do it by editing: /Library/Preferences/VMware\ Fusion/vmnet{{ N }}/nat.conf

Lets say you want to forward port 80:

docker-machine ip {{ your machine name }}

edit /Library/Preferences/VMware\ Fusion/vmnet8/nat.conf

Find the section:

[incomingtcp]
# Use these with care - anyone can enter into your VM through these...
# The format and example are as follows:
#<external port number> = <VM's IP address>:<VM's port number>
80 = {{ your machine ip }}:80

Now run the following:

sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cli --stop
sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cli --start

Evidently the Pro versions of Fusion (6,7,8) have a GUI for doing this.

theladyjaye avatar Oct 17 '15 22:10 theladyjaye

  • 1

zacksiri avatar Feb 07 '16 17:02 zacksiri