Closed1

[MEMO] PF on Mac OS X

awellawell

Command

起動・停止・確認

# Enable
pfctl -e
# Disable
pfctl -d
# Check Status
pfctl -si | head -n 1

設定読み込み

# pf.conf 読み込み
pfctl -f /etc/pf.conf
# pf.conf のパース (読み込まない)
pfctl -nf /etc/pf.conf
# NAT ルールのみ読み込み
pfctl -Nf /etc/pf.conf
# filter ルールのみ読み込み
pfctl -Rf /etc/pf.conf

設定表示

# NAT ルール表示
pfctl -sn
# filter ルール表示
pfctl -sr
# 状態テーブル表示
pfctl -ss
# フィルターの統計とカウンター表示
pfctl -si
# 全部表示
pfctl -sa

reference

https://murusfirewall.com/Documentation/OS X PF Manual.pdf

このスクラップは2024/09/07にクローズされました