1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2025-04-21 03:02:09 +00:00

fixed a bug with unable to reload network interface

This commit is contained in:
ChiefGyk 2016-06-29 19:56:01 -04:00
parent c15aa078b7
commit b66ab07ea0
4 changed files with 9 additions and 9 deletions

View File

@ -3,5 +3,5 @@ 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
ipset save > /etc/ipset.up.rules
iptables-save > /etc/iptables.up.rules
invoke-rc.d iptables-persistent save

View File

@ -3,5 +3,4 @@ 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
ipset save > /etc/ipset.up.rules
iptables-save > /etc/iptables.up.rules
invoke-rc.d iptables-persistent save

View File

@ -3,5 +3,5 @@ curl http://www.okean.com/antispam/iptables/rc.firewall.sinokorea > /tmp/sinokor
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
invoke-rc.d iptables-persistent save

View File

@ -13,6 +13,8 @@ if [[ $EUID -ne 0 ]]; then
echo
exit
fi
echo iptables-persistent iptables-persistent/autosave_v4 boolean true | debconf-set-selections
echo iptables-persistent iptables-persistent/autosave_v6 boolean true | debconf-set-selections
apt-get update
apt-get install -y ipset dialog
mkdir /etc/ipset
@ -22,7 +24,6 @@ cp conf/blacklist /etc/cron.daily/blacklist
chmod a+x /etc/cron.daily/blacklist
time /etc/cron.daily/blacklist
source conf/dialog.sh
iptables-save > /etc/iptables.up.rules
sed -i -e "\$apre-up ipset restore < /etc/ipset.up.rules" /etc/network/interfaces
sed -i -e "\$apre-up iptables-restore < /etc/iptables.up.rules" /etc/network/interfaces
apt-get install -y iptables-persistent
invoke-rc.d iptables-persistent save
echo "Blacklist has been installed. It will run daily automatically."