MacOS pf equivalent to iptables rule
After having struggle with this issue for a long time I was able to achieve the desired effect by:
sudo ifconfig lo0 alias &lt;ip&gt;
rdr pass on lo0 inet proto tcp from any to &lt;ip&gt; port &lt;port&gt; -&gt; 127.0.0.1