Configure macOS High Sierra Firewall to expose Docker container running NGinx On Port 80

2

I'm running an Nginx container on a firewall enabled macOS High Sierra machine with the following:

docker run -p 80:80 --name nginx nginx

Accessing Nginx via the machine's private network IP address works fine from the machine itself, but fails when trying to access it on a different machine on the network.

Things I've tried:

sudo /usr/libexec/ApplicationFirewall/socketfilterfw --add  /Applications/Docker.app/Contents/MacOS/Docker
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --unblockapp  /Applications/Docker.app/Contents/MacOS/Docker

and

sudo /usr/libexec/ApplicationFirewall/socketfilterfw --add /usr/local/bin/vpnkit
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --unblockapp /usr/local/bin/vpnkit

since vpnkit seems to be listening on port 80 with lsof -i :80:

vpnkit TCP *:http (LISTEN)

Additionally, doing an nmap -p 80 shows:

PORT STATE SERVICE

80/tcp filtered http

edst

Posted 2018-02-12T06:04:14.607

Reputation: 121

Did this ever receive an acceptable answer? I'm facing the same issue. – Jerry Saravia – 2019-08-08T16:37:56.247

No answers