Skip to content

Instantly share code, notes, and snippets.

@robsman
Created July 21, 2016 10:14
Show Gist options
  • Select an option

  • Save robsman/e4ca6bca65cda6fd1fb0b5f74f31e84c to your computer and use it in GitHub Desktop.

Select an option

Save robsman/e4ca6bca65cda6fd1fb0b5f74f31e84c to your computer and use it in GitHub Desktop.

Revisions

  1. robsman created this gist Jul 21, 2016.
    25 changes: 25 additions & 0 deletions VMware Fusion networking
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,25 @@
    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]