10
2
I installed nginx using ports and started it with sudo. Accessing the nginx welcome page from localhost works perfectly, however accessing it from an external computer fails.
Doing an nmap on the computer from the outside reveals
80/tcp filtered http
So clearly the mac firewall is blocking the port. I then proceed to add the nginx executable to the firewall exception list, however the nmap still shows up as port 80 being filtered and I'm unable to access the webpage. The exact binary that is in the list is /opt/local/sbin/nginx which to my knowledge seems correct
Any ideas what I should do? Thanks!
P.S. Turning the firewall off does allow me to access the website from the outside world, however that isn't an ideal solution.
I don't have an answer, but here are a couple of things to look at: check /var/log/appfirewall.log to see if it has anything useful, and run
sudo lsof -i:80
to make sure it's really nginx doing the listening (and that it's listening on all IPs, not just 127.0.0.1). – Gordon Davisson – 2012-12-14T22:40:21.740Hey Gordon, thanks for the suggestions!
My firewall log looks like this when I try to connect: Dec 18 02:12:56 MacBook-Pro.local socketfilterfw[80663] <Info>: Deny connecting from my.ip.is.here:55843 to port 80 proto=6
And this is the output of the listening table: nginx 80437 root 6u IPv4 0x35ec104ccb86c175 0t0 TCP *:http (LISTEN) nginx 80438 nobody 6u IPv4 0x35ec104ccb86c175 0t0 TCP *:http (LISTEN)
Looks like everything should be correct, but it's still getting blocked :( – Alex Ionescu – 2012-12-18T08:13:54.707
Is it possible you have two nginx executables, one allowed in the firewall and one not? That's the only thing I can think of... – Gordon Davisson – 2012-12-18T13:11:35.563