summaryrefslogtreecommitdiff
path: root/data/run
diff options
context:
space:
mode:
authorroot2022-05-30 15:59:54 +0200
committerroot2022-05-30 15:59:54 +0200
commit6891a04373daa365c35828ce71e047f5f14486e4 (patch)
tree20e71951c13407f5b7c49f3c9336fd876bbea666 /data/run
downloadIPFireCustomRules-6891a04373daa365c35828ce71e047f5f14486e4.tar.gz
IPFireCustomRules-6891a04373daa365c35828ce71e047f5f14486e4.tar.bz2
IPFireCustomRules-6891a04373daa365c35828ce71e047f5f14486e4.zip
Beta2: DNS & NTP Redirect To Exernal Working!
Diffstat (limited to 'data/run')
-rwxr-xr-xdata/run/firewall.local50
1 files changed, 50 insertions, 0 deletions
diff --git a/data/run/firewall.local b/data/run/firewall.local
new file mode 100755
index 0000000..4b9d78e
--- /dev/null
+++ b/data/run/firewall.local
@@ -0,0 +1,50 @@
1#!/bin/sh
2#
3# IPFire Custom Rules (icr)
4#
5# Github: https://github.com/MonkeyCat/IPFireCustomRules
6#
7# Loops over the local "rules.d/" subfolder files
8# Forwarding the (start/stop) command to every file
9# which extension is ".on". To enabled multiple
10# custom firewall rulesets!
11#
12# the configuration of the ipfire custom rules (ipfcr)
13# in the local "rules.d/*" sunfolder, is inside the
14# files themself!
15#
16# Use this at your OWN RISK. Not fully supported!
17#
18# License: GPL2
19#
20# icr v0.1 (c) 30 May 2022 code.monkeycat.com
21#
22# Nuff text...
23
24pwd=$PWD
25base=${PWD%/*/*}
26
27case "$1" in
28 start)
29 find $base/rules.d/ -maxdepth 1 -type f \( ! -name . \) -exec bash -c "{} $1" \;
30
31 ;;
32 stop)
33 find $base/rules.d/ -maxdepth 1 -type f \( ! -name . \) -exec bash -c "{} $1" \;
34
35 ;;
36 reload)
37 $0 stop
38 $0 start
39
40 ;;
41 flush)
42 iptables -t nat -F CUSTOMPREROUTING
43 iptables -t nat -F CUSTOMPOSTROUTING
44 iptables -F CUSTOMFORWARD
45
46 ;;
47 *)
48 echo "Usage: $0 {start|stop|reload|flush}"
49 ;;
50esac