mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2026-03-29 20:57:22 +02:00
removed geoblocks, made tor exit node blocking optional during setup via yes/no dialog which will comment out the appropriate line in /etc/cron.daily/blacklist. Rearranged some code, deleted some files and clutter.
This commit is contained in:
@@ -3,7 +3,6 @@ IPTABLES=/sbin/iptables
|
||||
URL=http://feeds.dshield.org/block.txt
|
||||
FILE=/tmp/dshield_block.text
|
||||
CHAIN=dshield
|
||||
|
||||
IP_TMP=/tmp/ip.tmp
|
||||
IP_BLACKLIST=/etc/ip-blacklist.conf
|
||||
IP_BLACKLIST_TMP=/tmp/ip-blacklist.tmp
|
||||
@@ -54,7 +53,7 @@ done
|
||||
# and also use a seprate chain file to support other iptables rules without flushing
|
||||
# i.e. fail2ban and ddosdeflate
|
||||
|
||||
|
||||
echo "Beginning steps to block 20 most malicious IP blocks."
|
||||
|
||||
# check to see if the chain already exists
|
||||
$IPTABLES -L $CHAIN -n
|
||||
@@ -65,7 +64,7 @@ if [ $? -eq 0 ]; then
|
||||
# flush the old rules
|
||||
$IPTABLES -F $CHAIN
|
||||
|
||||
echo "Flushed old rules. Applying updated dshield list...."
|
||||
echo "Flushed old rules..."
|
||||
|
||||
else
|
||||
|
||||
@@ -78,7 +77,7 @@ else
|
||||
# don't allow this traffic through
|
||||
$IPTABLES -A FORWARD -j $CHAIN
|
||||
|
||||
echo "Chain not detected. Creating new chain and adding dshield list...."
|
||||
echo "Chain not detected. Creating new chain..."
|
||||
|
||||
fi;
|
||||
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/bin/bash
|
||||
curl http://www.okean.com/antispam/iptables/rc.firewall.china > /tmp/china.sh
|
||||
chmod +x /tmp/china.sh
|
||||
source /tmp/china.sh
|
||||
rm -f /tmp/china.sh
|
||||
/etc/init.d/iptables-persistent save
|
||||
@@ -1,7 +0,0 @@
|
||||
#!/bin/bash
|
||||
curl http://www.okean.com/antispam/iptables/rc.firewall.korea > /tmp/korea.sh
|
||||
chmod +x /tmp/korea.sh
|
||||
source /tmp/korea.sh
|
||||
rm -f /tmp/korea.sh
|
||||
/etc/init.d/iptables-persistent save
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
#!/bin/bash
|
||||
curl http://www.okean.com/antispam/iptables/rc.firewall.sinokorea > /tmp/sinokorea.sh
|
||||
chmod +x /tmp/sinokorea.sh
|
||||
source /tmp/sinokorea.sh
|
||||
rm -f /tmp/sinokorea.sh
|
||||
ipset save > /etc/ipset.up.rules
|
||||
iptables-save > /etc/iptables.up.rules
|
||||
Reference in New Issue
Block a user