PF, The OpenBSD Packet Filter: Building The Network You Need: BSDCan, Ottawa, June 10th 2015 | ||
---|---|---|
Prev | Next |
Command line tables manipulation:
Add a table entry
$ sudo pfctl -t clients -T add 192.168.1/16
Delete a table entry
$ sudo pfctl -t clients -T delete 192.168.1.116
Show table contents (and redirect to file)
$ sudo pfctl -t clients -T show >/etc/clients
Replace table contents from a file
$ sudo pfctl -t clients -T replace -f /etc/clients
Commonly used commands - likely scripting candidates
Tip: look into cron(8) jobs
Worth noting: several apps including dhcpd and bgpd can interact with your PF rules via tables