I need to give Internet access to a VM under Vmware fusion 7 in Host-Only mode. I know how to do it in Linux, with the following IPtables rules:
sysctl -w net.ipv4.ip_forward=1
iptables -A FORWARD -o eth0 -i vboxnet0 -s 192.168.56.0/24 -m conntrack --ctstate NEW -j ACCEPT
iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
iptables -A POSTROUTING -t nat -j MASQUERADE
Can this be done in MacOS Sierra?

{en0,en1}, whenifconfigreports the interface asvmnet3? Furthermore, please correct "the IP of the Mac from step 2" to "the IP of the Mac from step 3". – Shuzheng Sep 05 '19 at 18:56