2

I have an Docker container running NGinx on a macOS High Sierra machine behind a corporate firewall that cannot be disabled. The container is unable to be accessed externally from other machines on the corporate network using the host IP. I have tried running the container on a machine not subject to the firewall and everything works fine, so the issue likely lies in the firewall.

Things I have tried:

Running

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

and

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

both commands add Docker to the list of apps under Security & Privacy > Firewall Options but the container is still not accessible remotely via the host IP.

  • @danielAzuelos Thanks for the feedback - do you mind sharing directions on doing what you suggested as I have no experience with tcpdump? – edst Feb 12 '18 at 18:57
  • Yes. Additionally, I have also confirmed that turning the firewall off enables the dockerized NGinx server to be accessed by other machines on the LAN. – edst Feb 13 '18 at 2:30
  • I'm taking about macOS's application firewall, the one accessed in System Preferences > Security & Privacy > Firewall. – edst Feb 14 '18 at 18:55
  • What do you name "corporate firewall" in your OQ? – dan Feb 15 '18 at 1:22
1

This issue is likely nothing to do with your local machine.

If you are behind a corporate firewall, that firewall is designed specifically (amongst other things) to prevent exactly what you are trying to do: set up an externally accessible server on the internal (protected, corporate) LAN

The only way to be able to access your Mac at work (no matter what it is running) is to ask if your IT department will allow it.

Personally if someone asked for something similar where I work, I'd laugh in their face. A corporate intranet (depending on what your company does...) is no place for a personal server of any sort.

They already (likely) have a number of externally accessible servers (EG email, remote access, etc.) that they spend a lot of time on making sure they are secure and safe. It is unlikely they'll let you do this.

Additionally they may block setting up servers like this at the network level. Again contact your IT department and tell them what you are trying to do.

  • 1
    Clarification: by 'externally' I mean accessed by other machines on the corporate network. I am able to do this with other servers on port 80 and not Docker. – edst Feb 12 '18 at 1:57
  • I also am having this issue with macOS 10.13 when running services including nginx, node--with applications added to the firewall and allowed access I cannot access for example http on the local network unless I turn off the firewall (listening on all interfaces, etc) turning off the firewall is the only thing that affects a change – jimmont Jun 23 '18 at 3:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .