소스 검색

Run blocking rules after adding a new rule

Bob Mottram 8 년 전
부모
커밋
24f4f043f2
1개의 변경된 파일9개의 추가작업 그리고 1개의 파일을 삭제
  1. 9
    1
      src/freedombone-utils-firewall

+ 9
- 1
src/freedombone-utils-firewall 파일 보기

@@ -15,7 +15,7 @@
15 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 20
 # This program is free software: you can redistribute it and/or modify
21 21
 # it under the terms of the GNU Affero General Public License as published by
@@ -448,6 +448,14 @@ function firewall_block_domain {
448 448
         iptables -I FORWARD -p tcp --dport 53 -m string --hex-string "$hexstr" --algo bm -j DROP
449 449
         echo "${blocked_domain}" >> $FIREWALL_DOMAINS
450 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 459
     fi
452 460
 }
453 461