I found a way to forward ports 80 and 443 to other arbitrary ports (3000 and 3001 in my case) using ipfw. But ipfw is deprecated and replaced by pfctl. Here are my ipfw declarations:

sudo ipfw flush
sudo ipfw add 100 fwd,3000 tcp from any to me 443
sudo ipfw add 200 fwd,3001 tcp from any to me 80
sudo ipfw show

How can I do the same thing with pfctl please?

I am still using Mountain Lion on my laptop so I am not currently available to try this, but look around a bit on BSD-related forums for "pf port forwarding" and such if this does not help you!

Port forwarding in Mavericks (and above).

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.