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 Jun 2 '19 at 18:31
  • @bmike yes (10.14.1) :) but i still can't find the source for pfctl CLI tool there... – horseyguy Jun 2 '19 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 Jun 2 '19 at 21:12

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 Jun 3 '19 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. – duskwuff -inactive- Jun 3 '19 at 9:11
  • ah, good point, you are correct! woe is me... – horseyguy Jun 3 '19 at 11:41

You must log in to answer this question.

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