From 24f4f043f2129a50235b60ba37745e639d9c8c99 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 7 May 2017 14:39:51 +0100 Subject: [PATCH] Run blocking rules after adding a new rule --- src/freedombone-utils-firewall | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/freedombone-utils-firewall b/src/freedombone-utils-firewall index 3cf55736..fae3bfdd 100755 --- a/src/freedombone-utils-firewall +++ b/src/freedombone-utils-firewall @@ -15,7 +15,7 @@ # License # ======= # -# Copyright (C) 2014-2016 Bob Mottram +# Copyright (C) 2014-2017 Bob Mottram # # 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 @@ -448,6 +448,14 @@ function firewall_block_domain { iptables -I FORWARD -p tcp --dport 53 -m string --hex-string "$hexstr" --algo bm -j DROP echo "${blocked_domain}" >> $FIREWALL_DOMAINS 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 }