🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: muc.lists.netbsd.tech.userlevel
Article #87

Re: blocklist / npf in daily output

#87
From: Brook Milligan
Date: Mon, 30 Nov 2026 16:28
48 lines
2467 bytes
> On Nov 30, 2026, at 01:19, Martin Husemann <martin@duskware.de> wrote:
> 
> On Sun, Nov 29, 2026 at 10:21:55AM -0700, Brook Milligan wrote:
>> +if checkyesno check_blocklist; then
>> + echo ""
>> + echo "blocklist:"
>> + blocklistctl dump ${check_blocklist_flags}
>> + echo ""
>> +fi
> 
> This all looks good to me, but I have an additional feature request :-)
> 
> Could we make an optional summary version of this? I don't
> want to have 100eds of blocked IPs in my daily, but would like to see
> a one-line-per service summary (easy awk job), like:
> 
> service blocked
> 22 41
> 587 542

Interesting idea.  I think you mean something like the following:

if checkyesno check_blocklist; then
        echo ""
        echo "blocklist summary:"
        (echo "service  blocked"; \
		blocklistctl dump -b \
		| sed -e 's/:/ /‘ \
		| awk 'NR>1 {a[$3]++;} END { for (i in a) print i, "\t", a[i]; }’ \
		| sort -k 1,1n;
	)
fi

How do you imagine this being controlled?  That is, how best to differentiate between a request for the detailed list and one for the summary?  Are you imagining another rc variable, e.g., check_blocklist_summary?

Cheers,
Brook


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de
Technical Details
Message-ID: <5CCB8A99-437D-49EA-AA64-3BEE96052BE4@biology.nmsu.edu>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!2.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.muc.de!.POSTED.news.muc.de!not-for-mail
References: <aw0xknxy8HNtBQYV@big-apple.aprisoft.de> <>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!2.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.muc.de!.POSTED.news.muc.de!not-for-mail
From: Brook Milligan <brook@biology.nmsu.edu>
Newsgroups: muc.lists.netbsd.tech.userlevel
Subject: Re: blocklist / npf in daily output
Date: Mon, 30 Nov 2026 09:28:56 -0700
Organization: Newsgate at muc.de e.V.
Sender: tech-userlevel-owner@NetBSD.org
Approved: news-admin@muc.de
Distribution: world
Message-ID: <5CCB8A99-437D-49EA-AA64-3BEE96052BE4@biology.nmsu.edu>
References: <aw0xknxy8HNtBQYV@big-apple.aprisoft.de> <>
MIME-Version: 1.0 (Mac OS X Mail 16.0 \(3826.400.131.1.6\))
Content-Type: text/plain;
	charset=utf-8
Content-Transfer-Encoding: quoted-printable
Injection-Info: news.muc.de; posting-host="news.muc.de:193.149.48.2";
	logging-data="473"; mail-complaints-to="news-admin@muc.de"
In-Reply-To: <aw0xknxy8HNtBQYV@big-apple.aprisoft.de>
Precedence: bulk
X-Newsgate-Id: f02c70b8849f+
X-No-Archive: Yes