6 ms·
Possibly the best tool in this space is blacklistd / blocklistd, which just exposes some reporting APIs and hooks them directly in sshd, rather than trying to p
by loeg 4y ago
Possibly the best tool in this space is blacklistd / blocklistd, which just exposes some reporting APIs and hooks them directly in sshd, rather than trying to parse failed logins out of logs. That said, meh.
https://github.com/zoulasc/blocklist https://github.com/zoulasc/blocklist
- deathanatos 4y agoEdit: Yeah, there's no race condition; the client sends the offending socket to blocklistd over the blocklistd socket. (Originally…) I'm a bit curious; it also seems to imply that it logs the fd number, and then blocklistd queries the kernel to obtain the remote's address. That seems like a race condition: 1. blocklist call is made 2. daemon closes the socket (connection has failed, after all) 3. next client connects 4. lookup is made by blocklistd, and the wrong peer is potentially incriminated (Actually, perhaps it's sending the fd over the socket. I forget you can do that, and the README is hard for me to follow. The "like syslog" also implied that it's logging over syslog to me, but that's not what the code does.)