hello everyone lately i have been asked to setup an exclusive firewall. i was given a script to do so how ever i get the following

firewall2.txt: line 96: syntax error near unexpected token `do
'/firewall2.txt: line 96: `for ip in $BADIP; do

i cant figure out why the hell i am getting errors on this generic bash firewall script i get an error @
"for ip in $BADIP; do"

i am pretty sure as the script progresses i will get same error at coresponding section in SHUN
please help i really dont know whats wrong or why i am get an interpreter error here.

PLEASE HELP I DONT HAVE ANY MORE TIME. i have been more or less told "get it done or get a new job" please help

echo "Setting up BAD IP chain"
for ip in $BADIP; do
	$IPT -A BADIP -s $ip -j LBADIP
	$IPT -A BADIP -d $ip -j LBADIP
# Shunned hosts ignored for the moment (none to shun...)
echo "Setting up SHUN list"
for ip in $SHUNIP; do
    $IPT -A SHUN -s $ip -j LSHUN
    $IPT -A SHUN -d $ip -j LSHUN
i am going to trying to run it in /bin/sh i te link has been made it should not make a diffrence i dont think... as you can see im trying to run it as a text file in /bin/bash and well you see what its doing.