Sub topic 12
Putting it together and knowing the limits
This chapter assumes you have worked through the earlier chapters. You should be comfortable with System Settings, have an Apple Account signed in on the Mac, have administrator access, and be able to run commands with sudo in Terminal. Here you will combine FileVault, the application firewall, and Find My into one layered defense. You will also learn what each one cannot do.
Three tools, three different threats
FileVault, the firewall, and Find My do not overlap much. Each covers a different part of the threat model.
| Feature | Threat it addresses | What it protects | When it matters |
|---|---|---|---|
| FileVault | Someone gets physical access to the Mac or its drive | Data at rest on the startup disk | Mac is off, or locked at the login window |
| Application firewall | Unwanted incoming network connections | Network services running on your Mac | Mac is on a network you do not control |
| Find My Mac | Loss or theft | Your ability to locate, lock, and erase the Mac, plus Activation Lock | After the Mac has left your hands |
The table suggests a useful habit. When you ask "is my Mac secure?", first ask which threat you mean. A Mac with a perfect firewall configuration and no FileVault leaks everything to anyone who removes the drive. A Mac with FileVault and a stolen unlocked session leaks everything too.
How the layers work together
Consider a realistic sequence: your laptop is stolen from a café.
- Lock and encryption. The thief finds the Mac asleep or shut down. With FileVault on, the startup disk is encrypted. Your login password or a recovery method is needed to unlock it, so the files are unreadable.
- Find My. You sign in to iCloud.com or use another Apple device. You mark the Mac as lost with Lost Mode, which locks it with a passcode and can show a message and contact number. If you decide the Mac is gone, you can erase it.
- Activation Lock. After an erase, Activation Lock ties the Mac to your Apple Account. A thief cannot easily reinstall macOS and use or sell the machine without your credentials.
- Firewall. While the thief's Mac is not yours to control, the firewall is irrelevant. But on the days you work on café Wi-Fi, it limits which apps can accept incoming connections from other devices on that network.
The firewall works on a different timescale than the other two. FileVault and Find My are mostly insurance against a bad day. The firewall is a standing reduction of your attack surface every time you join a network.
Limits of FileVault
FileVault protects data at rest. It does not protect data from anyone who can get past your login.
- It does not help while you are logged in. Once the disk is unlocked, the data is available to every process running as you, including malware you installed yourself.
- It is only as strong as your password. A short or guessed account password weakens the whole arrangement. Use a long passphrase.
- Recovery methods are also keys. If you chose iCloud account recovery, anyone who controls your Apple Account can potentially reset access. If you chose a recovery key, anyone who reads that key can unlock the disk. Store it away from the Mac, for example in a password manager or a safe, and never in a file on the encrypted disk.
- Losing every method means losing the data. If you forget your password and have no working recovery method, nobody can recover the disk, including Apple.
- Apple silicon already encrypts internal storage. Macs with Apple silicon encrypt internal storage by default in hardware. FileVault adds the requirement that your password unlocks the data. Turn it on anyway, because without it the disk can be read once the Mac starts normally.
- It does not replace backups. Encryption keeps others out. It does not recover your files from a failed drive or an accidental erase.
Limits of the application firewall
The macOS application firewall controls incoming connections on a per-app basis. It is narrower than people tend to assume.
- It is about incoming connections. It does not filter outgoing traffic. Malware that connects out to a server is not stopped by it, and it will not warn you about an app sending data away.
- It does not inspect content. It does not scan downloads, block phishing pages, or detect malware.
- Many Macs run few listening services. A default Mac has little listening for outside connections, so the firewall often has little to block. It becomes more valuable once you install software that opens network ports, such as development servers or file sharing.
- Allowed apps get through. Apps you allow, and by default signed apps that macOS allows automatically, can accept incoming connections. A rule is a trust decision about the app.
- Stealth mode hides, not hardens. Stealth mode makes the Mac not respond to probes such as ping and to connection attempts on closed ports. It does not fix a vulnerable service that you have allowed through.
- Block all incoming connections can break things. It blocks everything except a few essential services, so it also blocks file sharing, screen sharing, and many apps that depend on incoming traffic. Use it on untrusted networks, and turn it off when you need those features.
Limits of Find My
Find My only works if the pieces are in place and the Mac can be reached.
- Setup comes first. Find My Mac must be on before the Mac goes missing. You cannot enable it afterward.
- Location needs connectivity. A Mac that is offline cannot report where it is. On supported Macs, the Find My network can help locate an offline Mac through nearby Apple devices, but that is not guaranteed in every case, and it does not apply to a Mac that has been erased or powered off for a long time.
- Remote commands queue. Play Sound, Lost Mode, and Erase are delivered when the Mac next connects. Until then, nothing happens.
- Erase destroys the data, and it is final. Erase is a last resort. It is also the reason you keep backups.
- Activation Lock does not stop everything. It makes the Mac hard to reuse. It does not stop someone from stripping it for parts, and it cannot help if the thief already has your Apple Account password, for example through phishing.
- Your Apple Account is the key to everything. Find My, Activation Lock, and iCloud recovery for FileVault all depend on that one account. Protect it with a strong unique password and two-factor authentication.
A quick audit from Terminal
You can check the first two layers from Terminal. The spine's combined script prints a status summary for the disk and the firewall:
#!/bin/bash
# Print a quick security status summary for this Mac.
echo "FileVault: $(fdesetup status)"
echo "Firewall: $(/usr/libexec/ApplicationFirewall/socketfilterfw --getglobalstate)"
echo "Stealth: $(/usr/libexec/ApplicationFirewall/socketfilterfw --getstealthmode)"Find My has no documented command-line check. Confirm it in System Settings under your Apple Account, then iCloud.
If you want a script that tells you whether anything needs attention, you can turn the same commands into pass or fail checks:
#!/bin/bash
# Report PASS or FAIL for each layer that can be checked from Terminal.
fw=/usr/libexec/ApplicationFirewall/socketfilterfw
status=0
check() {
# $1 = label, $2 = text to look for, $3 = command output
if printf '%s' "$3" | grep -qi "$2"; then
echo "PASS $1"
else
echo "FAIL $1"
status=1
fi
}
check "FileVault on" "is On" "$(fdesetup status)"
check "Firewall on" "enabled" "$($fw --getglobalstate)"
check "Stealth mode" "enabled" "$($fw --getstealthmode)"
echo "Find My: confirm in System Settings > Apple Account > iCloud"
exit $statusTwo points about this script. First, a FAIL for stealth mode is not an error on every Mac. Stealth mode is optional, and you may reasonably leave it off. Second, if FileVault is still encrypting, fdesetup status says so, and the check can still pass because the output contains "FileVault is On". Read the full output when you see this.
To fix a failed firewall check, enable it from Terminal with administrator rights:
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate onCommon mistakes
- Turning on FileVault and never testing recovery. Make sure you know which method you chose, and that you can reach it. If it is an iCloud account, check that you can sign in. If it is a recovery key, check that it is stored somewhere you can find it.
- Saving the recovery key on the same Mac. If you cannot unlock the disk, you cannot read the file that would unlock it.
- Treating the firewall as antivirus. It filters incoming connections only.
- Enabling block all incoming on a Mac that shares files or screens, then wondering why sharing broke.
- Skipping Find My because the Mac "never leaves the desk." Laptops get left in taxis and lecture halls. Setup takes a minute.
- Selling or handing over a Mac without signing out. Activation Lock stays tied to your account until you sign out of it or remove the device. The new owner cannot use the Mac until you do.
- Assuming the layers cover everything. None of them replace software updates, backups, careful downloads, and a strong login password.
A short checklist
- FileVault is on, and you have tested your recovery method.
- The recovery key, if you chose one, is stored away from the Mac.
- The application firewall is on. Use stealth mode on networks you do not trust. Use block all incoming only when you do not need incoming services.
- Find My Mac is on, and you have confirmed this in System Settings.
- Your Apple Account has a strong password and two-factor authentication.
- You have a current backup, such as Time Machine, stored separately.
- You have run the status script once and read its output.
Exercise
A coworker says, "I turned on the firewall and Find My, so my laptop's files are safe if it's stolen." Which important protection is missing, and why do the other two not make up for it?
Show answer
FileVault is missing. Without disk encryption, the files can be read if someone removes the drive or boots the Mac from another system. Find My needs the Mac to be online to lock or erase it, so a thief who keeps it offline can still try to read the disk. The firewall only filters incoming network connections and does nothing for data on a stolen disk.
Exercise
You run the status script and it prints "FAIL Stealth mode" while the other two checks pass. Does this mean your Mac is insecure? What would you decide, and what command would show the current value?
Show answer
Not necessarily. Stealth mode is an optional setting that stops the Mac from replying to probes such as ping. The firewall is on, so incoming connections are still filtered per app. You decide based on the network you use: on public or untrusted networks, turn stealth mode on. The current value is shown by /usr/libexec/ApplicationFirewall/socketfilterfw --getstealthmode.
Exercise
Name two reasons Activation Lock and Erase together do not guarantee that a stolen Mac is useless to the thief, and one thing you can do beforehand to reduce the damage.
Show answer
First, the Mac may never connect to the internet, so the Erase and Lost Mode commands never arrive. Second, an attacker who has your Apple Account password, for example through phishing, can remove the Mac from your account, and a thief can also sell the Mac for parts. To reduce the damage, turn on FileVault with a long password so the data is unreadable even if the Mac stays offline, protect your Apple Account with two-factor authentication, and keep a backup so that an erase does not cost you your files.