Lähettäjä: Juha Saarinen Päiväys: Vastaanottaja: Marc Perkel, Dave C. Kopio: exim-users Aihe: Re: [Exim] Blocking incessant relay testers with Exim 4
Marc Perkel wrote: > Here's something I run on my linux server to block IP addresses.
>
> #!/bin/sh
> #
> # Firewall Rules - This section provides a front end to pre-filter
> # traffic coming in.
>
> # The idea is that this can filter hackers from known IP address
> # and filter packets before they even atempt to talk to services
>
> # --- Clear the Tables
>
> iptables -v -F INPUT
>
> # --- Filter Hackers
>
> # The file /etc/ipblocked contains a list of IP addresses that are
> blocked # on this system. These are IPs of people who have tried to
> hack us.
>
> if [ -f /etc/ipblocked ]; then
> for i in $( cat /etc/ipblocked ); do
> iptables -v -A INPUT -s $i -j DROP
> done
> fi