Results 1 to 1 of 1
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 01-20-2006 #1
- Join Date
- Jan 2006
Bash firewall script, causing me hell, and maybe my job
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
# BAD IPs echo "Setting up BAD IP chain" $IPT -N BADIP for ip in $BADIP; do $IPT -A BADIP -s $ip -j LBADIP $IPT -A BADIP -d $ip -j LBADIP done # Shunned hosts ignored for the moment (none to shun...) echo "Setting up SHUN list" $IPT -N SHUN for ip in $SHUNIP; do $IPT -A SHUN -s $ip -j LSHUN $IPT -A SHUN -d $ip -j LSHUN done