--- 2.0/unblock_ip.sh 2014-12-26 01:03:04.000000000 -0700
+++ 2.1/unblock_ip.sh 2014-12-26 18:40:12.000000000 -0700
@@ -1,8 +1,11 @@
#!/bin/sh
+#VERSION=2.1
BF=/root/blocked_ips.txt
OS=`uname`;
+BLOCK_CHAIN=blocked_ips
+
if [ "$ip" = "" ]; then
echo "Usage:";
echo " $0 1.2.3.4";
@@ -32,10 +35,10 @@
if [ "$OS" = "FreeBSD" ]; then
/sbin/ipfw -q table 10 delete $ip
else
- echo "Restarting iptables ...
";
- /etc/init.d/iptables restart
- #echo "Unblocking ip ...
";
- #/sbin/iptables -D INPUT -s $ip -j DROP
+ #echo "Restarting iptables ...
";
+ #/etc/init.d/iptables restart
+
+ /sbin/iptables -D ${BLOCK_CHAIN} -s $ip -j DROP
fi
exit 0;