Posts for November, 2013

Frequently used pf commands

November 9, 2013 Posted in Security

For my own convenience due to bad memory: (valid only with this article)

// Add or remove IP/subnet
# pfctl -t blockedips -T add
# pfctl -t blockedips -T delete

// Flush all NAT, filter, state, and table rules and reload /etc/pf.conf.
# pfctl -F all -f /etc/pf.conf

// View all IP address listed in tables
# pfctl -t blockedips -T show

// View statistics for each IP/CIDR
# pfctl -t blockedips -T show -v