3

I have a service that is listening on a tcp port, and it is listed with this command:

>netstat -atp tcp | grep -i "listen"
tcp4       0      0  192.168.2.5.8070       *.*                    LISTEN          
tcp4       0      0  *.postgresql           *.*                    LISTEN
...and more

but it is not accessible from other computers on the same network, and it is not listed with this command:

>nmap 192.168.2.5
PORT     STATE SERVICE
5432/tcp open  postgresql

(but e.g. PostgreSQL is listed).

I can access the webserver locally on http://192.168.2.5:8060 but not from other computers on the same network. How can I open the port externally?

The Firewall on System Preferences > Security & Privacy > Firewall is Turned Off.

  • What service is it? – grg Apr 1 '14 at 19:20
  • It is a home made webserver. But I get the same problem with any TCP server I code. – Jonas Apr 1 '14 at 19:28
  • The usual test would be telnet 192.168.2.5 8060 what does this show? – Mark Apr 1 '14 at 20:57
  • OS X has at least three firewalls; have you checked the other two? sudo pfctl -sa will dump the state of "pf" and sudo ipfw show will dump the older "ipfw" firewall. See this question and my answer for some examples of what the output should look like. – Gordon Davisson Apr 2 '14 at 2:40
  • @GordonDavisson care to make that a answer ? – Ruskes Apr 5 '14 at 8:36
1

On MacOS X greater than 10.8, you should allow incoming connections for this application.

Within:

System Preferences > Security & Privacy > Firewall > Firewall Options…

click on the +, and select the application to use.

  • I have Firewall: Off This computer's firewall is currently turned off. All incoming connections to this computer are allowed. in those preferences. – Jonas Mar 24 '14 at 17:02
  • 1
    → Jonas: thank you for adding this key detail. For me it is actually unimaginable to run any OS without a basic firewall on, logging and checked :[. – dan Mar 25 '14 at 7:20
0

If the file /etc/ipfilter/ipfw.conf exists, then you need to either remove it or edit it so that ipfw does not block the traffic. Since ipfw is deprecated, probably just delete the file and reboot.

0

It turns out that this issue was cased by a network problem. The two computers couldn't reach eachother. So there was no problem with the firewalls or so.

You must log in to answer this question.

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