I have looked here: https://github.com/apple/darwin-xnu

But all i can find is the 'back end' for the pfctl tool, but i am interested in the command-line pfctl tool itself, the option parser and so on.

Has Apple released source code for this or documented it in a manual page for 10.14.1?

  • 1
    Is the version of macOS you want this source listed here? opensource.apple.com
    – bmike
    Commented Jun 2, 2019 at 18:31
  • @bmike yes (10.14.1) :) but i still can't find the source for pfctl CLI tool there...
    – horseyguy
    Commented Jun 2, 2019 at 18:39
  • 1
    Searching that site is a PITA and the tool might not even be open sourced. Have you checked bsd sources? That might get you a file name or header name to latch on to and confirm if it’s released by Apple or not.
    – bmike
    Commented Jun 2, 2019 at 21:12

1 Answer 1


A path name embedded in the pfctl executable on my Mojave system:


suggests that it's part of a "PacketFilter" package which Apple hasn't released.

However, this filename suggests that the tool is very similar (if not identical) to the OpenBSD utility of the same name.

  • Thanks! But i would have thought they'd be required by law to release it - as it's based on the openbsd pfctl code afaict
    – horseyguy
    Commented Jun 3, 2019 at 7:57
  • 1
    The BSD license doesn't require source to be released. You may be thinking of GPL, which is more common for Linux software.
    – user101978
    Commented Jun 3, 2019 at 9:11
  • ah, good point, you are correct! woe is me...
    – horseyguy
    Commented Jun 3, 2019 at 11:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .