Spam Blocking with the xt_recent Kernel module ============================================== The system loads a persistent blacklist during startup to block known spam sources. During boot, previously saved iptables rules are restored and each IP address from a text file is inserted into the kernel's xt_recent list named "spambot". Boot Configuration ------------------ [ -f /mnt/sda/tinycore-mydata-backup/ip4tables.rules ] \ && iptables-restore \ < /mnt/sda/tinycore-mydata-backup/ip4tables.rules [ -f /mnt/sda/tinycore-mydata-backup/ip6tables.rules ] \ && ip6tables-restore \ < /mnt/sda/tinycore-mydata-backup/ip6tables.rules while read ip; do echo "+$ip" > /proc/net/xt_recent/spambot done < /mnt/sda/tinycore-mydata-backup/spambot.txt Required Files -------------- ip4tables.rules ip6tables.rules spambot.txt Example: spambot.txt -------------------- 45.91.64.2 Notes ----- The iptables rules are restored automatically during system startup. Each line in spambot.txt should contain a single IPv4 or IPv6 address. Every address is added to the kernel's xt_recent list named "spambot", making the blacklist persistent across reboots while keeping the list itself in a simple text file.