[CentOS] Questoin on iptables

Mon Jul 14 21:13:57 UTC 2014
Jerry Geis <geisj at pagestation.com>

On Mon, Jul 14, 2014 at 5:07 PM, Reindl Harald <h.reindl at thelounge.net>
wrote:

>
>
> Am 14.07.2014 23:00, schrieb Jerry Geis:
> > I am getting this error...
> >
> > Try `iptables -h' or 'iptables --help' for more information.
> > iptables v1.4.7: Couldn't load target
> > `Spamhaus':/lib64/xtables/libipt_Spamhaus.so: cannot open shared object
> > file: No such file
> >
> > yum provides says not found also.
> > CentOS 6.5 x86_64
>
> http://www.catb.org/esr/faqs/smart-questions.html
>
> it's obvious that you wrote a wrong iptables rule
> what do you image could yum find?
>
> post whatever you did or nobody can help you
>
>
>
>
I did not send the exact command I used but it is "yum
provides /lib64/xtables/libipt_Spamhaus.so"
No matches found.

I am using this script to block spam:
#!/bin/bash
IPTABLES=/sbin/iptables
FILE="/tmp/drop.txt"
URL="http://www.spamhaus.org/drop/drop.txt"

$IPTABLES -D INPUT -j Spamhaus
$IPTABLES -D OUTPUT -j Spamhaus
$IPTABLES -D FORWARD -j Spamhaus
$IPTABLES -F Spamhaus
$IPTABLES -X Spamhaus

cd /tmp
wget $URL
$IPTABLES -N Spamhaus

blocks=$(cat $FILE | egrep -v '^;' | awk '{ print $1}')
for ipblock in $blocks
do
        $IPTABLES -A Spamhaus -s $ipblock -j DROP
done

blocks=$(cat /etc/silentm/firewall_custom.conf | egrep -v '^;' | awk '{
print $1}')
for ipblock in $blocks
do
        $IPTABLES -A Spamhaus -s $ipblock -j DROP
done

$IPTABLES -I INPUT -j Spamhaus
$IPTABLES -I OUTPUT -j Spamhaus
$IPTABLES -I FORWARD -j Spamhaus

This script then outputs that error about the missing .so

jerry