4 203
modifications
Ligne 31 : | Ligne 31 : | ||
#! /bin/sh | #! /bin/sh | ||
banned_file=/ | banned_file=/srv/link/banned.list | ||
me=`dirname $0`/ | me=`dirname $0`/ | ||
Ligne 43 : | Ligne 43 : | ||
done | done | ||
else | else | ||
touch $ | touch $banned_list | ||
fi | fi | ||
echo "Started" | echo "Started" | ||
Ligne 67 : | Ligne 67 : | ||
iptables -A morales -s $2 -j DROP | iptables -A morales -s $2 -j DROP | ||
if [ "$?" = "0" ]; then | if [ "$?" = "0" ]; then | ||
echo "$2" >> | echo "$2" >> "$banned_file" | ||
echo "Added $2" | echo "Added $2" | ||
exit 0 | exit 0 | ||
Ligne 95 : | Ligne 95 : | ||
flush) | flush) | ||
iptables -F morales | iptables -F morales | ||
rm -f $ | rm -f "$banned_file" | ||
touch $ | touch "$banned_file" | ||
echo "ok" | echo "ok" | ||
exit 0 | exit 0 |