Corresponding ipfw rules in MacOS for this Iptables rules
To enable NAT for a host-only network in VMware Fusion do the following:


Enable forwarding by adding a file /etc/sysctl.conf with the content:

net.inet.ip.forwarding=1


and reboot
Connect the Mac to the host-only network and make a note of the network/netmask of the host.only network:


Enter ifconfig to get the vmnet IP of the Mac 

...
vmnet3: flags=8863&lt;UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST&gt; mtu 1500
        ether 00:50:56:c0:00:03 
        inet 192.168.9.1 netmask 0xffffff00 broadcast 192.168.9.255

In the IP setting of the guest VM enter an IP/netmask according to the host-only network settings (with the example above that's in the range 192.168.9.2-254/255.255.255.0), a gateway (the vmnet3 IP of the hosting Mac from step 3 - here: 192.168.9.1) and a DNS server.
Open the pf.conf file with:

sudo nano /etc/pf.conf


and add the lines:

nat on {en0, en1} proto {tcp, udp, icmp} from 192.168.9.0/24 to any -&gt; {en0, en1}
pass from {lo0, 192.168.9.0/24} to any keep state


after the line rdr-anchor "com.apple/*".

Depending on your Mac and your network configuration only one interface is sufficient (either en0 or en1). Also use the proper network/netmask (your vmnet config instead of 192.168.9.0/24)!.

Save the file and exit nano.
Check your pf.conf with:

sudo pfctl -vnf /etc/pf.conf

If no error occurs enable pf with:

sudo pfctl -ef /etc/pf.conf





After a reboot you have to relaunch pf because it's not started automatically while booting. To launch pf while booting check step 4 in this answer: What is the modern way to do port-forwarding on El Capitan? (forward port 80 to 8080)