Best Answer
Here's an IPtables rate limiting script for email. Just adjust the port number to rate limit
any other port. # Limit the number of incoming port 25 tcp connections
iptables -A INPUT -p tcp --dport 25 -m limit --limit 100/m --limit-burst 3 -j ACCEPT
iptables -A INPUT -p tcp --dport 25 -m limit --limit 100/m --limit-burst 3 -j LOG
--log-prefix SMTP-DROP:
iptables -A INPUT -p tcp --dport 25 -j DROP
iptables -A OUTPUT -p tcp --dport 25 -j ACCEPTYou can also use the recent module in IPtables. Some distros (like Gentoo) won't include it
as default (along with others): http://www.debian-administration.org/articles/187
|