我正在尝试通过命令行将受信任的站点添加到 Mac OS X 的防火墙中。我知道以前,我们能够使用ipfw通过使用端口号或 IP 在数据包级别配置防火墙。在 Leopard (10.5) 及更高版本中,有一个新功能可以将受信任的应用程序添加到列表中。这可以使用 UI 来完成:
系统偏好设置 > 安全 > 防火墙
以及使用命令行:socketfilterfw
%sudo /usr/libexec/ApplicationFirewall/socketfilterfw -t "[binary path of application]"
但是,当我执行上述命令时遇到问题,实用程序“挂起”并且似乎没有做任何事情。这是我会收到的输出,然后什么也不做:
kyue:/usr/libexec/ApplicationFirewall> sudo ./socketfilterfw -t \~/[my binary path]\
adding ~/[my binary path] to the list of trusted applications
GetSignException: creator ‘BNUp’
GetSignException: creator ‘BNu2′
GetSignException: creator ‘SWar’
GetSignException: creator ‘StCm’
GetSignException: creator ‘Dbl2′
GetSignException: creator ‘PJ03′
GetSignException: creator ‘PJ07′
GetSignException: creator ‘FP98′
这篇文章有很好的指导:
http://krypted.com/mac-os-x/command-line-alf-on-mac-os-x/comment-page-1/#comment-547
只是想知道这里是否有人可能知道为什么它似乎不起作用。
吉