Sfoglia il codice sorgente

Run blocking rules after adding a new rule

Bob Mottram 8 anni fa
parent
commit
24f4f043f2
1 ha cambiato i file con 9 aggiunte e 1 eliminazioni
  1. 9
    1
      src/freedombone-utils-firewall

+ 9
- 1
src/freedombone-utils-firewall Vedi File

15
 # License
15
 # License
16
 # =======
16
 # =======
17
 #
17
 #
18
-# Copyright (C) 2014-2016 Bob Mottram <bob@freedombone.net>
18
+# Copyright (C) 2014-2017 Bob Mottram <bob@freedombone.net>
19
 #
19
 #
20
 # This program is free software: you can redistribute it and/or modify
20
 # This program is free software: you can redistribute it and/or modify
21
 # it under the terms of the GNU Affero General Public License as published by
21
 # it under the terms of the GNU Affero General Public License as published by
448
         iptables -I FORWARD -p tcp --dport 53 -m string --hex-string "$hexstr" --algo bm -j DROP
448
         iptables -I FORWARD -p tcp --dport 53 -m string --hex-string "$hexstr" --algo bm -j DROP
449
         echo "${blocked_domain}" >> $FIREWALL_DOMAINS
449
         echo "${blocked_domain}" >> $FIREWALL_DOMAINS
450
         save_firewall_settings
450
         save_firewall_settings
451
+
452
+        # run the blocking rules now
453
+        if [ -f /usr/bin/gnusocial-firewall ]; then
454
+            /usr/bin/gnusocial-firewall
455
+        fi
456
+        if [ -f /usr/bin/postactiv-firewall ]; then
457
+            /usr/bin/postactiv-firewall
458
+        fi
451
     fi
459
     fi
452
 }
460
 }
453
 
461