- Joined
- Jan 23, 2016
- Messages
- 9
- Reaction score
- 0
- Points
- 1
Today I realised that my firewall wasn't running and that was quite a shock to me, I knew I turned it on at some point but didn't think of it any more.
Check the System Preferences.app and make sure yours is on:
Additionally I switched it on the "Block all incoming connections" in the FW-options (when unlocking the padlock the options settings come available).
I was so shocked that I wrote a script to run it at login to make sure the settings are always the way I want it, even an update will change settings without my consent.
It is not the nicest script but it should work. If you remove the (hash) before the
the script stops and you can see what happens or wether errors occur.
And that is exactly the problem I have. If I run the script, everything works fine (at least according to the terminal). BUT when I check the settings in the System Preferences.app (as above) I don't see changes there. Even if I reboot the system it seems the settings from Blocking all content does not work via script.
Do you have any suggestions or fixes?
Is your firewall switched off or on and did you know it?
Please comment below I am really curious what you think about a default setting which seems to switch off the Firewall!
WARNING When you switch all the options to "Block all..." your IPhone might not be able to share and send info to your Laptop (e.g. Airdrop).
Thanks much,
Uwe
PS: I am using a Macbook Pro with MaxOs 10.14...
Check the System Preferences.app and make sure yours is on:

Additionally I switched it on the "Block all incoming connections" in the FW-options (when unlocking the padlock the options settings come available).
I was so shocked that I wrote a script to run it at login to make sure the settings are always the way I want it, even an update will change settings without my consent.
Code:
#!/bin/bash
# ++++++++++++++++++++++++++++++++++++++
# + Firewall Einschalten bei Sys Start +
# ++++++++++++++++++++++++++++++++++++++
# Stop Firewall First
/usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate off
# Switch on Deny Incoming Traffic
/usr/libexec/ApplicationFirewall/socketfilterfw --setblockall on
# read -p "Press enter to continue"
# Switch on StealthMode
/usr/libexec/ApplicationFirewall/socketfilterfw --setstealthmode on
# Start Firewall again
/usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate on
# read -p "Press enter to continue"
# killall Terminal
# ++++++++ ALTERNATIVE ZU KILLALL TERMINAL W.O. ++++++++++
# +++++ closing the terminal window within the script ++++
# ++ the following is to close the script:
# ++ for more information see this site:
# ++ https://stackoverflow.com/questions/8798641/close-terminal-window-from-within-shell-script-unix
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
osascript -e 'tell application "Terminal" to close (every window whose name contains ".command")' &
exit
It is not the nicest script but it should work. If you remove the (hash) before the
Code:
read -p...
And that is exactly the problem I have. If I run the script, everything works fine (at least according to the terminal). BUT when I check the settings in the System Preferences.app (as above) I don't see changes there. Even if I reboot the system it seems the settings from Blocking all content does not work via script.
Do you have any suggestions or fixes?
Is your firewall switched off or on and did you know it?
Please comment below I am really curious what you think about a default setting which seems to switch off the Firewall!
WARNING When you switch all the options to "Block all..." your IPhone might not be able to share and send info to your Laptop (e.g. Airdrop).
Thanks much,
Uwe
PS: I am using a Macbook Pro with MaxOs 10.14...