Building The Network You Need With PF, The OpenBSD Packet Filter: BSDCan 2016, Ottawa, Canada, June 8th 2016 | ||
---|---|---|
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