Run blocking rules after adding a new rule

This commit is contained in:
Bob Mottram 2017-05-07 14:39:51 +01:00
parent 267ff1f8a2
commit 24f4f043f2
1 changed files with 9 additions and 1 deletions

View File

@ -15,7 +15,7 @@
# License # License
# ======= # =======
# #
# Copyright (C) 2014-2016 Bob Mottram <bob@freedombone.net> # Copyright (C) 2014-2017 Bob Mottram <bob@freedombone.net>
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by # it under the terms of the GNU Affero General Public License as published by
@ -448,6 +448,14 @@ function firewall_block_domain {
iptables -I FORWARD -p tcp --dport 53 -m string --hex-string "$hexstr" --algo bm -j DROP iptables -I FORWARD -p tcp --dport 53 -m string --hex-string "$hexstr" --algo bm -j DROP
echo "${blocked_domain}" >> $FIREWALL_DOMAINS echo "${blocked_domain}" >> $FIREWALL_DOMAINS
save_firewall_settings save_firewall_settings
# run the blocking rules now
if [ -f /usr/bin/gnusocial-firewall ]; then
/usr/bin/gnusocial-firewall
fi
if [ -f /usr/bin/postactiv-firewall ]; then
/usr/bin/postactiv-firewall
fi
fi fi
} }