Mac 上的 pfctl 防火墙开机自启
我现在使用macOS 15.3.2,在终端输入`sudo pfctl -s info`后显示 `Status: Enabled`。pf 防火墙不应该是默认开机后处于关闭状态吗?为什么会开机自启呢?
我并没有修改过'/System/Library/LaunchDaemons/com.apple.pfctl.plist'文件,其内容为
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Disabled</key>
<false/>
<key>Label</key>
<string>com.apple.pfctl</string>
<key>WorkingDirectory</key>
<string>/var/run</string>
<key>Program</key>
<string>/sbin/pfctl</string>
<key>ProgramArguments</key>
<array>
<string>pfctl</string>
<string>-f</string>
<string>/etc/pf.conf</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
可以看见其中并没有<string>-e</string>命令来显式启动pf防火墙,但pf防火墙就是开机自启了,大家是不是这种情况呢?
[经过版主编辑]
MacBook Pro 14″, macOS 15.3