Join Nostr
2026-04-23 07:39:35 UTC
in reply to

Julian Oliver on Nostr: Here's a thing I did in a couple of mins to ban all IPs in the parasites.txt ...

Here's a thing I did in a couple of mins to ban all IPs in the parasites.txt serverside. You could ofc REJECT rather than DROP to send a message.

---
#!/bin/bash

while read parasite;
do
if [[ "$parasite" == *"."* ]]; then
iptables -I INPUT -s "$parasite" -j DROP
elif [[ "$parasite" == *":"* ]]; then
ip6tables -I INPUT -s "$parasite" -j DROP
fi
done < /path/to/parasites.txt
---