Re: Manually add IP address to blocklistd
- Reply: Doug Hardie : "Re: Manually add IP address to blocklistd"
- In reply to: Doug Hardie : "Manually add IP address to blocklistd"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 16 Apr 2026 11:52:44 UTC
Doug Hardie <bc979@lafn.org> writes: > I am looking for a way to manually add an address to blocklistd. I > wrote a quick program to make calls to the blocklist lib. However, > all the visible calls require a connected fd. I am able to fake that. The fd needs to be a a connection to or from the address you want to block, so I very much doubt that you are able to fake that unless you are trying to block one of your own addresses. I suppose you could create a non-blocking socket and call connect() before passing the socket to blocklistd, but I'm not sure if getpeername() will work unless the connection succeeds. tl;dr: blocklistd does not currently support what you want to do. I suggest you contact the upstream author (Christos at Zoulas dot com / Christos at NetBSD dot org) and ask him to implement this, or look into doing so yourself. DES -- Dag-Erling Smørgrav - des@FreeBSD.org