tech-net archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: blocklist / npf in daily output
Seems very reasonable - complete with update to daily(5)? :-p
David
On Thu, 26 Nov 2026 at 17:19, Brook Milligan <brook%netbsd.org@localhost> wrote:
>
> Given the state of the current internet, it seems that blocklistd and an appropriate npf rule would be the recommended best practice. To facilitate monitoring them, I wonder if adding the following (see below) to /etc/daily and /etc/defaults/daily.conf would be appropriate.
>
> I have been running something like this for some time and find the output useful for monitoring that blocklist/npf are working correctly.
>
> Note that with this patch nothing different will happen on any systems with this installed, as the defaults for check_blocklist and check_npf are NO.
>
> I appreciate any comments. Thanks a lot.
>
> Cheers,
> Brook
>
>
> Index: etc/daily
> ===================================================================
> RCS file: /cvsroot/src/etc/daily,v
> retrieving revision 1.93
> diff -u -r1.93 daily
> --- etc/daily 23 Sep 2018 23:16:34 -0000 1.93
> +++ etc/daily 26 Nov 2026 17:03:35 -0000
> @@ -246,6 +246,21 @@
> fi
> fi
>
> +if checkyesno check_blocklist; then
> + echo ""
> + echo "blocklist:"
> + blocklistctl dump ${check_blocklist_flags}
> + echo ""
> +fi
> +
> +if checkyesno check_npf; then
> + for npf_rule in ${npf_rules}; do
> + echo "NPF rule: ${npf_rule}"
> + npfctl rule "${npf_rule}" list
> + echo ""
> + done
> +fi
> +
> if checkyesno run_fsck; then
> echo ""
> echo "Checking file systems:"
> Index: etc/defaults/daily.conf
> ===================================================================
> RCS file: /cvsroot/src/etc/defaults/daily.conf,v
> retrieving revision 1.18
> diff -u -r1.18 daily.conf
> --- etc/defaults/daily.conf 30 Jul 2012 17:09:34 -0000 1.18
> +++ etc/defaults/daily.conf 26 Nov 2026 17:03:35 -0000
> @@ -23,6 +23,8 @@
> show_remote_fs=NO
> check_mailq=YES
> check_network=YES
> +check_blocklist=NO
> +check_npf=NO
> full_netstat=NO
> run_fsck=NO
> run_fsck_flags=""
>
Home |
Main Index |
Thread Index |
Old Index