Re: Manually add IP address to blocklistd
Dag-Erling Smørgrav <[email protected]> Thu, 16 Apr 2026 13:52:44 +0200
| Newsgroups | gmane.os.freebsd.questions |
|---|---|
| Message-ID | <[email protected]> |
Doug Hardie <[email protected]> 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 - [email protected]