Sub topic 2
What a firewall does and does not do
Assume you can use System Settings, have administrator access, and can run basic Terminal commands.
What a firewall does and does not do
A firewall controls network connections arriving at your Mac. The macOS application firewall mainly decides whether applications can accept incoming connections. It can prompt when an application first tries to listen for connections and can remember your choice.
A firewall helps reduce exposure on public networks. It does not encrypt your files, remove malware, stop phishing, or protect an account whose password was stolen. It also does not block every connection your Mac starts, such as browsing to a malicious website.
Enabling the macOS firewall
Open System Settings, choose Network, then Firewall. Turn on Firewall. Select Options or Firewall Options to review its rules.
You can also enable it from Terminal. This command requires an administrator password:
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate onStealth mode, blocking all incoming connections, and app rules
Stealth mode makes the Mac less visible to some network probes. It does not make the Mac anonymous or prevent allowed connections.
Block all incoming connections denies incoming connections except those required for basic services, such as services macOS must support. Use it when you do not need file sharing, screen sharing, or other inbound services. Check which applications and services your work requires before enabling it.
In Firewall Options, use the per-app list to allow or block applications. Allow only applications you recognize and need. A rule for an application does not prove that the application itself is safe.
Check the main settings from Terminal:
/usr/libexec/ApplicationFirewall/socketfilterfw --getglobalstate
/usr/libexec/ApplicationFirewall/socketfilterfw --getstealthmode
/usr/libexec/ApplicationFirewall/socketfilterfw --getblockallSetting up Find My Mac
Open System Settings, select your Apple Account, choose iCloud, and open Find My Mac. Turn on Find My Mac. If offered, also enable the Find My network and the option to send the Mac’s last location.
Find My can show a Mac’s location, play a sound, mark it as lost, or erase it remotely. These actions depend on the Mac being powered on or later reconnecting to the network. Activation Lock helps prevent another person from activating the Mac after it is erased.
Exercise
Which feature reduces unwanted incoming network connections, and which feature helps locate a missing Mac?
Show answer
The macOS application firewall reduces unwanted incoming connections. Find My Mac helps locate, lock, or erase a missing Mac.