How to stop the macOS firewall leaking system network data after a software update

Jump to First Reply
Posted:
in macOS

Several sources report the firewall in macOS Sequoia can sometimes leak data after an update. Here's how to test and fix it.

macOS Sequoia sometimes leaks data when updating.
macOS Sequoia can sometimes leak data after an update.



The macOS firewall in System Settings allows you to protect your Mac and filter network traffic based on a set of rules.

Several sites, including mullvad.net have reported that after macOS Sequoia updates, the firewall built into macOS may leak some data, allowing it to avoid firewall rules.

The cause of this leak is unknown - but apparently, a Mac restart fixes the problem after updating.

Background



Being based on BSD, macOS uses a packet-based network filter known simply as Packet Filter or "PF" for short (also known as Berkeley Packet Filter). PF goes way back to the early versions of BSD and OpenBSD when networking was added to UNIX.

PF works based on a set of rules stored in a file, which on macOS is named pf.conf that lives at the root of your Startup Disk in /private/etc. You'll need to turn on invisible files in the macOS Finder, or use the command line in Terminal to view the file.

You can open pf.conf in TextEdit but if you change the contents of the file be sure you understand PF and how the rules file works. You can learn more about pf.conf in Terminal by typing:

man pf.conf and pressing Return

pf.conf also points to a folder in /private/etc named pf.anchors which contains sets of individual rules based on domains.

You can also use the tcpdump command in Terminal to print a description of the contents of packets on a network interface based on a boolean expression. For more info on tcpdump in Terminal, type:

man tcpdump and press Return

A packet is one unit of information transmitted across a network that contains data, network headers, and routing information. When your computer loads data over a network it does so in chunks (packets) and reassembles received data into something an application can understand.

Packet filtering and firewalls work by allowing or blocking data.

pfctl

pfctl

is another command-line utility that can be used to control PF. To see its usage and options in Terminal type:

man pfctl and press Return.

For some pfctl commands you may need to use the sudo prefix. pfctl is quite extensive and there's a lot you can do with it.

As mullvad.net mentions, you can use pfctl to see if your Mac is affected by the leak. But we should warn you: don't attempt this unless you're comfortable using Terminal as changing the firewall rules can affect how your Mac receives network data.

You can turn the macOS firewall on or off completely in System Settings->Network->Firewall.

For most Mac users, this bug shouldn't be a big issue - just be sure you Restart your Mac after any system updates and everything should be fine. Hopefully, Apple will fix this bug soon.

You can read more about packet filtering on OpenBSD's website, and in the FreeBSD Handbook.

If you're looking for free firewall router software based on BSD, check out pfsense.



Read on AppleInsider

Comments

  • Reply 1 of 9
    There is also a problem with Firewall disabling Airplay in macOS Sequoia. Here are some discussions about the problem:

    The solution in all three discussions is to disable Firewall, set up the Airplay connection and then re-enable Firewall. The Airplay connection continues to work after Firewall is re-enabled but any new connection requires disabling it again. This is very inconvenient but at least it is a workaround.

    I do not see a lot of discussion about this problem which suggests either Airplay from macOS is not used very much or it is something else on the computers which is causing the problem. If it is the latter I would be very interested to know what I can change to remove the problem.
    dewmeappleinsideruserwatto_cobra
     0Likes 0Dislikes 3Informatives
  • Reply 2 of 9
    WilliamM said:
    There is also a problem with Firewall disabling Airplay in macOS Sequoia. Here are some discussions about the problem:

    The solution in all three discussions is to disable Firewall, set up the Airplay connection and then re-enable Firewall. The Airplay connection continues to work after Firewall is re-enabled but any new connection requires disabling it again. This is very inconvenient but at least it is a workaround.

    I do not see a lot of discussion about this problem which suggests either Airplay from macOS is not used very much or it is something else on the computers which is causing the problem. If it is the latter I would be very interested to know what I can change to remove the problem.
    I would suggest many, if not most, people don't use the firewall.  They just happily sit in their house behind a NAT router, and never experience the problem.
     0Likes 0Dislikes 0Informatives
  • Reply 3 of 9
    DAalsethdaalseth Posts: 3,131member
    a Mac restart fixes the problem after updating
    Well, that’s all I needed to know. I shut my Mac down every night.
    watto_cobra
     1Like 0Dislikes 0Informatives
  • Reply 4 of 9
    ciacia Posts: 274member
    I don't understand half the stuff Chip Loader writes about, but I sure do like reading the articles he put out.  Keep it up!
    watto_cobra
     1Like 0Dislikes 0Informatives
  • Reply 5 of 9
    lotoneslotones Posts: 114member
    I've been doing a complete shut down and restart after updates since they stopped shipping OS X on discs. Always seems to make things run better. Those few times I've forgotten I noticed wonky-ness (technical term) until I did it.
    watto_cobra
     1Like 0Dislikes 0Informatives
  • Reply 6 of 9
    So what data is leaked? Might have been nice to mention, Chip.
    watto_cobra
     1Like 0Dislikes 0Informatives
  • Reply 7 of 9
    M68000m68000 Posts: 909member
    Speaking of updates,  I have a MacBook Air that can only run Sonoma.  It has the latest version of Sonoma but every so often I get message an update is available - but there is no update.  Is anybody else having this issue?
    watto_cobra
     1Like 0Dislikes 0Informatives
  • Reply 8 of 9
    macguimacgui Posts: 2,502member
    lotones said:
    I've been doing a complete shut down and restart after updates since they stopped shipping OS X on discs. Always seems to make things run better. Those few times I've forgotten I noticed wonky-ness (technical term) until I did it.
    A complete Shutdown and Restart can sometimes fix wonkiness that isn't fixed by a Restart sans Shutdown. This has worked for my even when wonkiness wasn't update related. If there's any reason do suspect/expect a Restart to fix a problem, I do a complete Shutdown and Restart. It takes a minute or less longer.
    watto_cobralotones
     2Likes 0Dislikes 0Informatives
  • Reply 9 of 9
    dewmedewme Posts: 5,862member
    M68000 said:
    Speaking of updates,  I have a MacBook Air that can only run Sonoma.  It has the latest version of Sonoma but every so often I get message an update is available - but there is no update.  Is anybody else having this issue?
    Yes, but not with the same combination of versions. I have a 2013 MacBook Pro running Big Sur and I occasionally I get a notification to update to Monterey. 
    watto_cobra
     1Like 0Dislikes 0Informatives
Sign In or Register to comment.