#!/bin/bash
if [ $# -ne 1 ];then
echo "usage : $0 ip "
exit 0
fi
DENY_IP="$1"
iptables -I INPUT -s $DENY_IP -j DROP
if [ $? -eq 0 ];then
echo "$DENY_IP" >> deny_ip_list
fi
/etc/rc.d/init.d/iptables save
~
#!/bin/bash
if [ $# -ne 1 ];then
echo "usage : $0 ip "
exit 0
fi
DENY_IP="$1"
iptables -I INPUT -s $DENY_IP -j DROP
if [ $? -eq 0 ];then
echo "$DENY_IP" >> deny_ip_list
fi
/etc/rc.d/init.d/iptables save
~