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 ?
-
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 192.168.23.128.
First open the Manage Virtual Networks start menu item:
Click on the NAT tab, and then click on Edit. You will see the NAT Settings dialog:
Click the Port Forwarding button, and you will see this dialog:
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.
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.
EDIT:
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.
Martin : Thanks - this is exactly what I want to do, but I cannot find these options on VMWare Fusion.Martin : I will try changing nat.conf as you suggest and see how far that gets me. Thanks again.From Trozz
0 comments:
Post a Comment