Fusion

 View Only

How to set up NAT port forwarding to host-only VM on SL server?

  • 1.  How to set up NAT port forwarding to host-only VM on SL server?

    Posted Dec 16, 2009 09:44 PM

    I already posted this on the Apple Mac OS X Server discussions but I think this is probably the better place.

    I am trying to setup NAT in SL Server to redirect http traffic on port

    80 to a virtual NIC of a host-only VMWare Fusion VM. The SL Server is

    behind a router firewall that forwards the traffic on port 80 to it on

    ip address 192.168.54.78, which the SL Servers NAT should then route to

    the VM with ip 192.168.38.28. The connection between Host and Guest OS

    is through a virtual network adapter VMNet1. Firewall has been opened

    on port 80 in both systems to the corresponding subnets. It is possible

    to connect from the host to the guest VM by addressing 192.168.38.28:80

    but addressing 192.168.54.78:80 doesn't forward the request to the

    192.168.38.28:80 of the guest. The /etc/nat/natd.plist redirect_port settings is as

    follows:

    <key>redirect_port</key>

    <array>

    <dict>

    <key>aliasIP</key>

    <string>192.168.54.78</string>

    <key>aliasPortRange</key>

    <string>80</string>

    <key>proto</key>

    <string>tcp</string>

    <key>targetIP</key>

    <string>192.168.38.28</string>

    <key>targetPortRange</key>

    <string>80</string>

    </dict>

    </array>

    Is it at all possible to make the NAT port forward to a virtual network device in this way? My aim is to sandbox the guest so that only requests can come in on port 80 but the guest should not be able to access anything outside its own subnet such as the hosts public ip.

    I use Fusion 3.0.1.