How to forward port 80 to 8080 in os x mavericks

user2930390 picture user2930390 · Oct 29, 2013 · Viewed 14.8k times · Source

I installed Mac OS X Mavericks (10.9), and I'm using Jetty to publish a web app. I type

sudo ipfw add 100 fwd 127.0.0.1,8080 tcp from any to any 80 in

(my hosts file has 127.0.0.1 abc.com)

but Safari can't connect to abc.com. It worked in OS X 10.8 though. Why?

Answer

John picture John · Oct 29, 2013

ipfw has been deprecated since Mountain Lion but was not removed until Mavericks. It's now using the ported pf exclusively.

I wrote a quick guide to configure and setup pf for port forwarding in Mavericks.