What is socketfilterfw, and why is it running on my Mac?
Last reviewed: 19 November 2026. Path, account, launchd job, man page and settings wording checked on macOS 26.3.1.
socketfilterfw is the macOS Application Firewall: the daemon that decides which apps and services may accept incoming network connections, and also a command-line tool for its settings. It is launched when the firewall needs it and uses CPU only briefly when apps start listening for connections. It is part of macOS and is controlled from System Settings > Network > Firewall.
socketfilterfw at a glance
| socketfilterfw | |
|---|---|
| Made by | Apple (part of macOS, Application Firewall) |
| Type | System daemon and command-line tool |
| Location | /usr/libexec/ApplicationFirewall/socketfilterfw |
| Runs as | root |
| Started by | launchd job com.apple.alf |
| Can you quit it? | Not usefully. launchd restarts it while the firewall needs it. |
What is socketfilterfw?
Its man page describes socketfilterfw as "a daemon that gets launched on demand when the Application Firewall is enabled" and adds that "there are also command-line options to change the Application Firewall behavior." Unlike a firewall that filters by port number, the Application Firewall works per app: you allow or block incoming connections for each app or service.
It runs as root from the com.apple.alf launchd job. On this Mac, with the firewall switched off, the process was still running, so seeing it does not by itself mean the firewall is on; socketfilterfw --getglobalstate reports the real state.
Is socketfilterfw safe?
Yes. It is part of macOS in /usr/libexec/ApplicationFirewall on the read-only system volume. It only handles incoming connections; it does not block apps from connecting out to the internet.
Why does socketfilterfw use so much CPU and network?
- Apps that start listening for connections. When an app opens a port to accept connections, such as a file sharing service, a game host or a development server, the firewall checks it against its rules.
- Firewall prompts. With the firewall on, a new app that wants incoming connections triggers a prompt asking whether to allow it, and your answer is saved.
- Incoming connection attempts. Connections from other devices to a listening app are checked. Stealth mode, when on, stops the Mac from answering probes such as ping.
How much CPU is normal for socketfilterfw?
0% CPU almost all the time, with short blips when apps start listening for connections. A couple of megabytes of memory is typical.
How do you stop socketfilterfw from using so much CPU?
- Check whether the firewall is on. Open System Settings > Network and click Firewall, or run
/usr/libexec/ApplicationFirewall/socketfilterfw --getglobalstatein Terminal. - Review allowed and blocked apps. In the Firewall pane, click Options to see the list of apps and services and whether each can receive incoming connections.
- List apps from Terminal. Run
/usr/libexec/ApplicationFirewall/socketfilterfw --listappsto print the apps the firewall knows about and their status. - Use stealth mode if you want. In Firewall Options, Enable stealth mode makes the Mac ignore ping and similar probes. It does not affect normal app use.
When should you worry about socketfilterfw?
If an app you do not recognise appears in the firewall list as allowed to receive incoming connections, find out what it is before leaving it allowed.
If file sharing, screen sharing or another sharing service stops working right after you change firewall settings, check whether Block all incoming connections is on; Apple's setting text says it blocks those services.
How do you check socketfilterfw in Activity Monitor and Terminal?
Open Activity Monitor (Applications > Utilities), choose View > All Processes, and type socketfilterfw in the search field. The CPU tab shows its % CPU. The Network tab shows its Sent Bytes and Rcvd Bytes. Double-click the row for its parent process, memory details and open files.
In Terminal, the first command lists every socketfilterfw process with its PID, user, CPU and memory (RSS is resident memory in kilobytes). nettop shows its live network traffic.
ps -axo pid,user,%cpu,%mem,rss,command | grep -F 'socketfilterfw' | grep -v grep
nettop -p socketfilterfw
How can Thrum help with socketfilterfw?
Thrum keeps a live CPU graph in the menu bar. One click shows the eight processes using the most CPU, so you can see when socketfilterfw is among them and how much it takes. An optional alert tells you when a process stays above a CPU level you choose (50 to 200% of one core) for 1 to 10 minutes. macOS does not let apps quit processes owned by root or other users, so Thrum shows them for information and leaves stopping them to the steps above.
Thrum is $4.99 once with a 14-day free trial and no account. It requires macOS 26 Tahoe on Apple silicon or Intel.
Questions about socketfilterfw
Does the macOS firewall block outgoing connections?
No. The Application Firewall controls incoming connections only. Blocking outgoing connections needs a separate app built for that.
Why is socketfilterfw running when my firewall is off?
launchd can keep it loaded for its other services. On macOS 26.3.1 it was running with the firewall off; the --getglobalstate option shows whether filtering is actually enabled.
What does Block all incoming connections do?
Apple's setting text says it blocks all incoming connections except those required for basic internet services, such as DHCP and IPSec, and that it blocks sharing services such as file and screen sharing.
Sources
- socketfilterfw(8) man page: run man socketfilterfw in Terminal
- Apple Support: Block connections to your Mac with a firewall