Skip to content

Instantly share code, notes, and snippets.

@robsman
Created July 21, 2016 10:14
Show Gist options
  • Save robsman/e4ca6bca65cda6fd1fb0b5f74f31e84c to your computer and use it in GitHub Desktop.
Save robsman/e4ca6bca65cda6fd1fb0b5f74f31e84c to your computer and use it in GitHub Desktop.
See https://github.com/docker/machine/issues/1351 for details
[snip]
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.
[/snip]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment