pf.conf dosyasını yüklemek için
# pfctl -f /etc/pf.conf
pf.conf dosyasını kontrol etmek için
# pfctl -nf /etc/pf.conf
Sadece NAT kurallarını yüklemek için
# pfctl -Nf /etc/pf.conf
Sadece filtreleme kurallarını yüklemek için
# pfctl -Rf /etc/pf.conf
Çalışan sistemde ki NAT kurallarını görmek için
# pfctl -sn
Çalışan filtreleri görmek için
# pfctl -sr
Durum tablosunu görmek için
# pfctl -ss
Filtre durumunu ve sayacı görmek için
# pfctl -si
Herşeyi görmek için
# pfctl -sa
pf'i komut satırından enkinleştirmek
# pfctl -e
pf'i komut satırından devre dışı bırakmak için
# pfctl -d
Tabloya bir adres eklemek için
# pfctl -t iptablosu -T add 10.56.90.12
Bu komut eğer sistemde iptablosu isimli tablo dosyası yoksa da oluşturur.
Tablonun içeriğini görmek için
# pfctl -t iptablosu -T show
Tablodan bir İP veya İP grubunu çıkarmak için
# pfctl -t iptablosu -T delete 10.56.90.11
# pfctl -t iptablosu -T delete 10.56.90.0/24
Tablodaki İP lerin ayrıntılı istatistiklerini görmek için
# pfctl -t iptablosu -T show -v
tabloyu siler
# pfctl -t iptablosu -T kill
tablodaki tüm adresleri siler
# pfctl -t iptablosu -T flush
durum tablosunu görmek için
# pfctl -s state
durum tablosunu boşaltmak için
# pfctl -F state
-F nat Flush the NAT rules.
-F queue Flush the queue rules.
-F rules Flush the filter rules.
-F states Flush the state table (NAT and filter).
-F Sources Flush the source tracking table.
-F info Flush the filter information (statistics that are not bound to rules).
-F Tables Flush the tables.
-F osfp Flush the passive operating system fingerprints.
-F all Flush all of the above.
host makinasının bağlantısını sonlandırmak için
# pfctl -k host
host1 ve host2 arasındaki bağlantıyı sonlandırmak için
# pfctl -k host1 -k host2
networkleri arasındaki tüm bağlantıları sonlandırır.
# pfctl -k 10.56.90.0/24 -k 10.56.2.0/24
host2 giden tüm bağlantıları sonlandırır.
# pfctl -k 0.0.0.0/24 -k host2