I've been searching for this, but I'm having a bit of a difficult time finding exactly what it is that I want.
I have a Raspberry Pi behind a DHCP server running on my iMac (iMac is 192.168.2.1 to the pi, pi is 192.168.2.21). I want incoming traffic to the Mac (addr 10.5.6.4) to redirect to the pi (say port 8086 on the Mac would redirect to the pi port 22).
I tried adding "nat on en0 from any to any port 8086 -> 192.168.2.21 port 22" to the pf.conf file and reloading the service, but that didn't seem to accomplish anything. I have a very limited understanding of NAT and PF, so any and all help will be appreciated.
The purpose of this is so that other people on the network can connect to the Pi (and eventually other servers as well) using my Mac's IP and whatever port I specify. I know that there's a way to do it; I just don't know exactly how.