bruns@2mbit.com 2010-06-22 04:49:41 +00:00
parent d91225a585
commit e78af1d4cc
1 changed files with 13 additions and 8 deletions

View File

@ -4,6 +4,10 @@
# URL: http://www.sosdg.org/freestuff/firewall # URL: http://www.sosdg.org/freestuff/firewall
# License: GPLv3 # License: GPLv3
echo -e "SOSDG/Firewall v0.9"
echo -e "Brielle Bruns <bruns@2mbit.com>"
echo -e "http://www.sosdg.org/freestuff/firewall\n"
BASEDIR=/etc/firewall-sosdg BASEDIR=/etc/firewall-sosdg
TWEAKS=$BASEDIR/tweaks TWEAKS=$BASEDIR/tweaks
#BASEDIR=`pwd` #BASEDIR=`pwd`
@ -25,15 +29,16 @@ $BASEDIR/prerun
$IPTABLES -A INPUT -i lo -j ACCEPT $IPTABLES -A INPUT -i lo -j ACCEPT
$IPTABLES -A OUTPUT -o lo -j ACCEPT $IPTABLES -A OUTPUT -o lo -j ACCEPT
echo -ne "\E[33mAdding trusted IP:\E[37m "
if [ "$TRUSTEDIP" ]; then
echo -ne "\E[33mAdding trusted IP:\E[37m "
for i in $TRUSTEDIP; do for i in $TRUSTEDIP; do
echo -n "$i " echo -n "$i "
$IPTABLES -A INPUT -s $i -j ACCEPT $IPTABLES -A INPUT -s $i -j ACCEPT
$IPTABLES -A OUTPUT -d $i -j ACCEPT $IPTABLES -A OUTPUT -d $i -j ACCEPT
done done
echo -ne "\n" echo -ne "\n"
fi
if [ $BLOCKEDIP ]; then if [ $BLOCKEDIP ]; then
echo -en "\E[33mAdding blocked IPs:\E[37m " echo -en "\E[33mAdding blocked IPs:\E[37m "