Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a mac-mini (Fall 2009) with OS X 10.8.4 on my local network and I am running a simple http server on port 5000 (or any other port).

I have turned the firewall OFF. I can connect to the mac via ssh and ping it.

I can connect to the http server using

...I get the data...

but if I use the IP that my local router has assigned to this mac, I cannot connect to the port. e.g.:

$ curl -v
* About to connect() to port 5000 (#0)
*   Trying
* Connection refused
* couldn't connect to host
* Closing connection #0
curl: (7) couldn't connect to host

This does not work on the local mashine nor form a remote machine.

However this works:

$ ssh
Last login: ....

The firewall is off:

$ defaults read /usr/libexec/ApplicationFirewall/ firewallunload

and ipfw seems to be OK:

$ sudo ipfw show
65535 0 0 allow ip from any to any

Interestingly, if I run the same http-server on my MacBookPro on the same network, I can connect....

Where can the problem be? And how can I debug it?

share|improve this question
up vote 4 down vote accepted

Check if your webserver isn't only listening on, if so set it to to listen on all interfaces (or your network public address - so that it can be reached from other machines on the network.

share|improve this answer
in my case I could have changed the script or set an environment variable export PORT= – Michael_Scharf Jun 18 '13 at 2:14

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.