Re: [Exim] Exim 3.35 -> blocking IP address

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Ryan Tracey
Data:  
Para: Exim Mailing List
Assunto: Re: [Exim] Exim 3.35 -> blocking IP address
I do something similar for a small subset of hosts that really annoy me:

${IPT} -t filter -N SPAMLOGDROP
${IPT} -t filter -A SPAMLOGDROP -m limit --limit 10/minute --limit-burst
10 -j LOG --log-prefix "IPTABLES:spam " --log-level 5
${IPT} -t filter -A SPAMLOGDROP -j DROP

for host in `cat /var/log/exim/firewall_smtp`; do
         ${IPT} -t filter -A INPUT -i eth0 -p tcp -s ${host}
--destination-port 25 -j SPAMLOGDROP
done



What sort of limits are there on the number of hosts that can be blocked
using :

- iptables
- exim.conf: host_reject = /path/to/flat/textfile
- exim filter: using a dbm file


Regards,
Ryan

Marc Perkel wrote:
> As an alternative - if you want a stronger reject you can run this bash
> script:
>
> if [ -f $BLACKLIST ]; then
>   for ipaddress in $( grep -v ^# $BLACKLIST | awk '{print $1}' ); do
>      iptables -v -A INPUT -s $ipaddress -j DROP
>   done
> fi

>
> $BLACKLIST is a lit of IP addresses or host names. This will lock out
> the IPs from talking to your server entirely.