Network hygiene: Blocking, scrubbing and so on

Table of Contents
block-policy
scrub
antispoof
Handling non-routable addresses from elsewhere

Our gateway does not feel quite complete without a few more items in the configuration which will make it behave a bit more sanely towards hosts on the wide net and our local network.

block-policy

block-policy is an option which can be set in the options part of the ruleset, which precedes the redirection and filtering rules. This option determines which feedback, if any, PF will give to hosts which try to create connections which are subsequently blocked. The option has two possible values, drop which drops blocked packets with no feedback, and return which returns with status codes such as Connection refused or similar.

The correct strategy for block policies has been the subject of rather a lot of discussion. We choose to play nicely and instruct our firewall to issue returns:

set block-policy return