I always forget pfctl commands, so here are some notes.
Rule Related
- Check current rules
# pfctl -s rules
- Add -v to see statistics
# pfctl -vs rules
Table Operations
- List tables
# pfctl -s Tables
- Add -vv to see statistics
# pfctl -vvs Tables
- Display IP addresses in a table
# pfctl -t <table> -T show
- Add an IP address to a table
# pfctl -t <table> -T add <IPAddress>
- Remove an IP address from a table
# pfctl -t <table> -T delete <IPAddress>
- Remove all IP addresses from a table
# pfctl -t <table> -T flush