8 Replies Latest reply: Nov 14, 2007 5:24 AM by jamesfromhereford
Redwoodtree Level 1 (115 points)
I have a service running on port 8888, it's a command line c application.

How do I open this port in the firewall?

Come on Apple, it can't be that hard can it??

MacBook Pro 2.0, G5 1.6, TiBook 800, Pismo 447
  • direwolf8 Level 4 (1,280 points)
    I haven't checked this for syntax. From a terminal window, type man ipfw for the man page,
    You want something like:

    ipfw add allow tcp from any 8888 to any
  • Craig Brady Level 4 (1,790 points)
    In the terminal:

    sudo ipfw add allow tcp from x to y

    x = starting port
    y = ending port

    If only opening one port, make both x and y the single port number. Your admin password will be requested, and does not echo on the screen.

    To close the port(s) again, replace the word "allow" with the word "deny"
  • jamesfromhereford Level 1 (45 points)
    Is there a terminal command to reset all the ports to default? I have been experimenting with ports and would like to reset it back to default so no ports are left open.
  • Redwoodtree Level 1 (115 points)
    Good question ! This is one reason I don't like the command line administration of firewall rule sets, it's so easy to make a mistake and/or forget what the original settings were.

    I'll take a list of the default settings and post them here if no one else does (I'm not on leopard right now).
  • jamesfromhereford Level 1 (45 points)
    Thanks very much, look forward to hearing back from you.
  • toddimus Level 1 (0 points)
    I've been having the same problem trying to figure out how to open up port 24800 so I can use synergy to share my keyboard and mouse. So after much searching I found an app with a somewhat lacking user interface that allows you to open and close ports amongst other things. It's free so I guess I shouldn't complain. It's called Waterroof and is a gui wrapper for terminal methods that have been discussed as solutions on this and other threads.

    http://www.hanynet.com/waterroof/index.html
  • Redwoodtree Level 1 (115 points)
    Sorry I didn't reply sooner, Leopard has not been my day-to-day OS because of issues such as this one

    Anyway, the default I have with the System Preferences set to "Allow all incoming connections" is this:
    65535 allow ip from any to any

    When I change the System Preference to "Block all incoming connections" or "Set access for specific services . . . " it makes no difference, it's always just this same: 65535 allow ip from any to any
  • jamesfromhereford Level 1 (45 points)
    Thanks for your help.