Giter Club home page Giter Club logo

Comments (6)

bensleveritt avatar bensleveritt commented on May 24, 2024

Hey, thanks for filing this issue. I'm not familiar with firewall states, and a cursory investigation reveals that /usr/libexec/ApplicationFirewall/socketfilterfw (what this command uses under the hood) doesn't have an obvious way to set state 2 on. I did notice that if I set block all, then turn it off and on from the commandline, it maintained the setting in Settings.

Do you see the same thing?

from m-cli.

heywoodlh avatar heywoodlh commented on May 24, 2024

I do not see the same thing.

This is before I disable and re-enable with m:

image

Then I disable and re-enable with m, using the following command:

m firewall disable && m firewall enable

After I quit out of System Preferences (it doesn't seem to refresh the settings in realtime in System Preferences if you disable/enable with m) and open the firewall tab back up in Security & Privacy, these are my settings:

image

from m-cli.

heywoodlh avatar heywoodlh commented on May 24, 2024

So I looked at the command you mentioned and found that I can set State 2 with the following command:

sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setblockall on

You can see what happens when I disable the firewall with m, re-enable the firewall, and then issue that command:

$ m firewall status
Firewall is enabled. (State = 2)

$ m firewall disable
Firewall is disabled. (State = 0)

$ m firewall enable
Firewall is enabled. (State = 1)

$ m firewall status
Firewall is enabled. (State = 1)

$ sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setblockall on
Firewall is set to block all non-essential incoming connections

$ m firewall status
Firewall is enabled. (State = 2)

from m-cli.

bensleveritt avatar bensleveritt commented on May 24, 2024

Ah well researched! If you feel up to it, feel free to open a PR. Otherwise I'll have a look at the end of the week.

from m-cli.

heywoodlh avatar heywoodlh commented on May 24, 2024

Done!

#161

from m-cli.

bensleveritt avatar bensleveritt commented on May 24, 2024

Merged #161 , so I'll close this

from m-cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.