I recently had a need to access my virtual machine in VMWare Fusion through the Windows Remote Desktop (RDP, port 3389). I needed to also keep the NAT setup rather than bridging my virtual machine directly to the network.
Thanks to this guy, I was able to configure the VMWare NAT configuration to listen to the specific port on the host machine’s network adapter and forward to the specific port on the virtual machine.
Here is how I did it:
- Open Terminal
- Navigation to the “vmnet8” directory
[shell]
cd /Library/Application Support/VMware Fusion/vmnet8
[/shell]
- Open “nat.conf” with VI (must be superuser mode, sudo)
[shell]
sudo vi nat.conf
[/shell]
- Using the arrow keys, move the cursor to the line after “[incomingtcp]”
- To edit the document, hit : o (colon, then the letter O)
- Enter the port and IP information like the following:
[shell]
[incomingtcp]
3389 = 192.168.104.133:3389[/shell]
HOST_PORT = VM_IPADDRESS:VM_PORT
- Then just restart the VMWare Networking stack and you are done
[shell]sudo /Library/Application Support/VMware Fusion/boot.sh –restart[/shell]
Awesome tip. Thanks. For testing reasons I needed this too with NAT. will give it a go!
Glad it helped :)
Thank you John !
It is exactly the tip I am looking for. I tried “bridged” and “NAT” in Virtual Box and VMware Fusion on my Macbook and only “NAT+VMware” works. I think it is because I am inside company’s network.
Anyway, thank you so much.
Mine says library/applicaton: not found
Since “Application Support” has a space you may need to put a in front of the space, like /Library/Application Support/…
Tried this – couldnt find the directory /Library/Application Support/VMware Fusion/
Ended up adding another network card to the virtual machine with a “host-only” type of network.
This has the added benefit that I can run two different virtual machines both hosting a service on port 80, 22, etc..
I don’t believe I have this folder. I’m running Lion. Is this PC only, did I miss something?
I know there were some changes to the library folders in Lion, but not exactly sure how the changes apply. You might check the Library folder of your Home folder.
I think this is the new location.
Library/Preferences/VMware Fusion/vmnet8
This method doesn’t work for Fusion 5. They have moved the nat.conf to /Library/Preferences and I can’t find a boot.sh file.