MacOS pf equivalent to iptables rule I am looking to implement a rule like the following iptables rule on my Mac.
sudo iptables -t nat -A OUTPUT -d 10.244.1.8 -p tcp --dport 4369 -j DNAT --to-destination 127.0.0.1:4369

Context: In my current setup I am port forwarding a container in k8s through kubectl port-forward and I am trying to, when I ping the IP of the running erlang node on the container be able to translate this IP into the localhost to carry the processing (the setup can be found on this post https://www.mendrugory.com/post/remote-elixir-node-kubernetes/)
Thanks in advance!
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