As I'm reviewing the firewall-drop.sh script in the lab, I noticed the
top of the file states it only requires the SRCIP, but when it checks
for the IP, it's looking in the third parameter (which shouldn't even
be passed) instead of the second:
#!/bin/sh
# Adds an IP to the iptables drop list (if linux)
# Adds an IP to the ipfilter drop list (if solaris, freebsd or netbsd)
# Adds an IP to the ipsec drop list (if aix)
# Requirements: Linux with iptables, Solaris/FreeBSD/NetBSD with
ipfilter or AIX with IPSec
# Expect: srcip
# Author: Ahmet Ozturk (ipfilter and IPSec)
# Author: Daniel B. Cid (iptables)
# Last modified: Feb 14, 2006
[trim]
ACTION=$1
USER=$2
IP=$3
[trim]
# Checking for an IP
if [ "x${IP}" = "x" ]; then
echo "$0: <action> <username> <ip>"
exit 1;
fi
Is it just me, or am I missing something somewhere else??
Thanks.
JM