In terminal command, “sudo sysctl -w net.inet.ip.forwarding=1”
To read the current value:
“sysctl net.inet.ip.forwarding”
To set the value:
“sudo sysctl net.inet.ip.forwarding=1”
To set it on boot, create the file
“/private/etc/sysctl.conf” with contents “net.inet.ip.forwarding=1”