|
@@ -4,7 +4,9 @@ BADGUYS_FILE="" # The location (full path) where you want to download the list
|
|
|
CHAIN_NAME="CINSARMY_IPS" # The firewall chain to hold the cinsarmy rules
|
|
|
FIREWALL="/sbin/iptables" # The path to iptables
|
|
|
ETH="" # The name of the ethernet port you'd like to apply these rules to. Example: eth1
|
|
|
-
|
|
|
+BLOCKMODE="" # If you want these rules to apply to just this machine, this should be "INPUT".
|
|
|
+ # If you want these rules to apply to a network behind this machine, this should be "FORWARD".
|
|
|
+
|
|
|
echo "Downloading the cinsarmy bad guys list of IPs."
|
|
|
|
|
|
wget -c https://cinsscore.com/list/ci-badguys.txt -O $BADGUYS_FILE
|
|
@@ -25,7 +27,7 @@ else
|
|
|
echo "Creating chain $CHAIN_NAME."
|
|
|
$FIREWALL -N $CHAIN_NAME
|
|
|
# Jump to our chain from the FORWARD chain
|
|
|
- $FIREWALL -A FORWARD -j $CHAIN_NAME
|
|
|
+ $FIREWALL -A $BLOCKMODE -j $CHAIN_NAME
|
|
|
fi
|
|
|
|
|
|
echo "Processing the updated bad guys list. This might take a while..."
|