Operations grimoire/Firewall: Difference between revisions
From Nasqueron Agora
(Very basic pf) |
|||
Line 8: | Line 8: | ||
IP addresses or ranges to block can be added to the badhost table: | IP addresses or ranges to block can be added to the badhost table: | ||
<syntaxhighlight | <syntaxhighlight lang="console"> | ||
$ pfctl -t badhosts -T add $IP_TO_BLOCK | |||
$ pfctl -t badhosts -T show | |||
$ pfctl -t badhosts -T delete $IP_TO_BLOCK | |||
</syntaxhighlight> | </syntaxhighlight> |
Latest revision as of 00:30, 21 October 2024
pf
Work in progress. As of 2024-10-21, pf is only deployed to Hervil.
pf is installed on FreeBSD and OpenBSD servers.
Block a specific IP or range
IP addresses or ranges to block can be added to the badhost table:
$ pfctl -t badhosts -T add $IP_TO_BLOCK
$ pfctl -t badhosts -T show
$ pfctl -t badhosts -T delete $IP_TO_BLOCK