Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to forward port 80 to 8080 in os x mavericks

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?

like image 257
user2930390 Avatar asked Oct 29 '13 02:10

user2930390


People also ask

How do I find port 8080 on Mac?

The port in use in Mac OS can be checked with the lsof command. lsof stands for list open files and is a command to check the list of open files in the system. If you look at the output result of the lsof command, you can see that the process with PID 27871 is using port 8080.

How do I know if my port forwarding is working Mac?

On a Mac computer (earlier than macOS 11 Big Sur) Type "Network Utility" in the search field and select Network Utility. Select Port Scan, enter an IP address or hostname in the text field, and specify a port range. Click Scan to begin the test. If a TCP port is open, it will be displayed here.


1 Answers

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.

like image 103
John Avatar answered Oct 04 '22 22:10

John