Is there a way to check firewall setting in java code?

Discussion in 'Mac Programming' started by Daeyong, Feb 20, 2009.

  1. Daeyong macrumors newbie

    Feb 19, 2009
    I have been googling for about 5 hours and I'm totally exhausted and knew serveral things below.

    1. I have to know whether the firewall is monitoring networks or not in a java application. I mean, I have to detect the firewall setting in my application.

    2. I've found the "ipfw" is related to mac OS's firewall. Is "ipfw" the only way to get the firewall setting?

    3. I've found that I need the root permission to execute "ipfw list" on the terminal. Is it possible to get the root permission in java application to execute the script using Runtime.exec()? if it's impossible, after getting the root permission in a cocoa app, is it possible to run java app from cocoa?

    4. By default, the firewall is turned on, right? can I turn it off?

    I'll be very appreciated if anybody helps me.

    Thank you.

Share This Page