diff options
Diffstat (limited to 'src/slack/rc.firewall.in')
| -rwxr-xr-x | src/slack/rc.firewall.in | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/src/slack/rc.firewall.in b/src/slack/rc.firewall.in index 092af9d..4179255 100755 --- a/src/slack/rc.firewall.in +++ b/src/slack/rc.firewall.in | |||
| @@ -39,36 +39,36 @@ | |||
| 39 | # | 39 | # |
| 40 | # Files are processed in the following order: | 40 | # Files are processed in the following order: |
| 41 | # | 41 | # |
| 42 | # /etc/firewall.d/global-pre - centrally maintained pre-hook script | 42 | # /etc/firewall.d/global-pre - centrally maintained pre-hook script |
| 43 | # /etc/firewall.d/cluster/rules-pre - cluster specific pre-hook script | 43 | # /etc/firewall.d/cluster/rules-pre - cluster specific pre-hook script |
| 44 | # /etc/firewall.d/rules-pre - host specific pre-hook script | 44 | # /etc/firewall.d/rules-pre - host specific pre-hook script |
| 45 | # /etc/firewall.d/apps.d/*.pre - app pre-hook script | 45 | # /etc/firewall.d/apps.d/*.pre - app pre-hook script |
| 46 | # | 46 | # |
| 47 | # /etc/firewall.d/globalsets - centrally maintained IP sets | 47 | # /etc/firewall.d/globalsets - centrally maintained IP sets |
| 48 | # /etc/firewall.d/cluster/ipsets - cluster specific IP sets | 48 | # /etc/firewall.d/cluster/ipsets - cluster specific IP sets |
| 49 | # /etc/firewall.d/ipsets - host specific IP sets | 49 | # /etc/firewall.d/ipsets - host specific IP sets |
| 50 | # /etc/firewall.d/apps.d/*.ipsets - app specific IP sets | 50 | # /etc/firewall.d/apps.d/*.ipsets - app specific IP sets |
| 51 | # | 51 | # |
| 52 | # /etc/firewall.d/global4 - centrally maintained IPv4 rules | 52 | # /etc/firewall.d/global4 - centrally maintained IPv4 rules |
| 53 | # /etc/firewall.d/global6 - centrally maintained IPv6 rules | 53 | # /etc/firewall.d/global6 - centrally maintained IPv6 rules |
| 54 | # /etc/firewall.d/global - centrally maintained IPv4/IPv6 rules | 54 | # /etc/firewall.d/global - centrally maintained IPv4/IPv6 rules |
| 55 | # | 55 | # |
| 56 | # /etc/firewall.d/cluster/rules4 - cluster specific IPv4 firewall rules | 56 | # /etc/firewall.d/cluster/rules4 - cluster specific IPv4 firewall rules |
| 57 | # /etc/firewall.d/cluster/rules6 - cluster specific IPv6 firewall rules | 57 | # /etc/firewall.d/cluster/rules6 - cluster specific IPv6 firewall rules |
| 58 | # /etc/firewall.d/cluster/rules - cluster specific IPv4/IPv6 firewall rules | 58 | # /etc/firewall.d/cluster/rules - cluster specific IPv4/IPv6 firewall rules |
| 59 | # | 59 | # |
| 60 | # /etc/firewall.d/rules4 - host specific IPv4 firewall rules | 60 | # /etc/firewall.d/rules4 - host specific IPv4 firewall rules |
| 61 | # /etc/firewall.d/rules6 - host specific IPv6 firewall rules | 61 | # /etc/firewall.d/rules6 - host specific IPv6 firewall rules |
| 62 | # /etc/firewall.d/rules - host specific IPv4/IPv6 firewall rules | 62 | # /etc/firewall.d/rules - host specific IPv4/IPv6 firewall rules |
| 63 | # | 63 | # |
| 64 | # /etc/firewall.d/apps.d/*.rules4 - app specific IPv4 firewall rules | 64 | # /etc/firewall.d/apps.d/*.rules4 - app specific IPv4 firewall rules |
| 65 | # /etc/firewall.d/apps.d/*.rules6 - app specific IPv6 firewall rules | 65 | # /etc/firewall.d/apps.d/*.rules6 - app specific IPv6 firewall rules |
| 66 | # /etc/firewall.d/apps.d/*.rules - app specific IPv4/IPv6 firewall rules | 66 | # /etc/firewall.d/apps.d/*.rules - app specific IPv4/IPv6 firewall rules |
| 67 | # | 67 | # |
| 68 | # /etc/firewall.d/global-post - centrally maintained post-hook script | 68 | # /etc/firewall.d/global-post - centrally maintained post-hook script |
| 69 | # /etc/firewall.d/cluster/rules-post - host specific post-hook script | 69 | # /etc/firewall.d/cluster/rules-post - host specific post-hook script |
| 70 | # /etc/firewall.d/rules-post - host specific post-hook script | 70 | # /etc/firewall.d/rules-post - host specific post-hook script |
| 71 | # /etc/firewall.d/apps.d/*.post - app post-hook script | 71 | # /etc/firewall.d/apps.d/*.post - app post-hook script |
| 72 | # | 72 | # |
| 73 | 73 | ||
| 74 | 74 | ||
| @@ -182,17 +182,17 @@ load() | |||
| 182 | # Function to start the network: | 182 | # Function to start the network: |
| 183 | start() { | 183 | start() { |
| 184 | # run pre-hooks | 184 | # run pre-hooks |
| 185 | run_hook start ${FW_PREFIX}global-pre "running global pre-hook start ..." | 185 | run_hook start ${FW_PREFIX}global-pre "running global pre-hook start ..." |
| 186 | run_hook start ${FW_PREFIX}cluster/rules-pre "running cluster pre-hook start ..." | 186 | run_hook start ${FW_PREFIX}cluster/rules-pre "running cluster pre-hook start ..." |
| 187 | run_hook start ${FW_PREFIX}rules-pre "running local pre-hook start ..." | 187 | run_hook start ${FW_PREFIX}rules-pre "running local pre-hook start ..." |
| 188 | for FILE in $(find -L /etc/firewall.d/apps.d/ -executable -name '*.pre' -type f 2> /dev/null);do | 188 | for FILE in $(find -L /etc/firewall.d/apps.d/ -executable -name '*.pre' -type f 2> /dev/null);do |
| 189 | run_hook start ${FILE} "running app pre-hook start (App: $(basename ${FILE})) ..." | 189 | run_hook start ${FILE} "running app pre-hook start (App: $(basename ${FILE})) ..." |
| 190 | done | 190 | done |
| 191 | 191 | ||
| 192 | # create IP sets | 192 | # create IP sets |
| 193 | load ipset ${FW_PREFIX}globalsets "adding global IP sets" | 193 | load ipset ${FW_PREFIX}globalsets "adding global IP sets" |
| 194 | load ipset ${FW_PREFIX}cluster/ipsets "adding cluster IP sets" | 194 | load ipset ${FW_PREFIX}cluster/ipsets "adding cluster IP sets" |
| 195 | load ipset ${FW_PREFIX}ipsets "adding local IP sets" | 195 | load ipset ${FW_PREFIX}ipsets "adding local IP sets" |
| 196 | for FILE in $(find -L /etc/firewall.d/apps.d -name '*.ipsets' -type f 2> /dev/null);do | 196 | for FILE in $(find -L /etc/firewall.d/apps.d -name '*.ipsets' -type f 2> /dev/null);do |
| 197 | load ipset ${FILE} "adding IP sets (App: $(basename ${FILE})) ..." | 197 | load ipset ${FILE} "adding IP sets (App: $(basename ${FILE})) ..." |
| 198 | done | 198 | done |
| @@ -248,9 +248,9 @@ start() { | |||
| 248 | fi | 248 | fi |
| 249 | 249 | ||
| 250 | # run post-hooks | 250 | # run post-hooks |
| 251 | run_hook start ${FW_PREFIX}global-post "running global post-hook start ..." | 251 | run_hook start ${FW_PREFIX}global-post "running global post-hook start ..." |
| 252 | run_hook start ${FW_PREFIX}cluster/rules-post "running cluster post-hook start ..." | 252 | run_hook start ${FW_PREFIX}cluster/rules-post "running cluster post-hook start ..." |
| 253 | run_hook start ${FW_PREFIX}rules-post "running local post-hook start ..." | 253 | run_hook start ${FW_PREFIX}rules-post "running local post-hook start ..." |
| 254 | for FILE in $(find -L /etc/firewall.d/apps.d/ -executable -name '*.post' -type f 2> /dev/null);do | 254 | for FILE in $(find -L /etc/firewall.d/apps.d/ -executable -name '*.post' -type f 2> /dev/null);do |
| 255 | run_hook start ${FILE} "running app post-hook start (App: $(basename ${FILE})) ..." | 255 | run_hook start ${FILE} "running app post-hook start (App: $(basename ${FILE})) ..." |
| 256 | done | 256 | done |
| @@ -260,9 +260,9 @@ start() { | |||
| 260 | # Function to stop the network: | 260 | # Function to stop the network: |
| 261 | stop() { | 261 | stop() { |
| 262 | # run pre-hooks | 262 | # run pre-hooks |
| 263 | run_hook stop ${FW_PREFIX}global-pre "running global pre-hook stop ..." | 263 | run_hook stop ${FW_PREFIX}global-pre "running global pre-hook stop ..." |
| 264 | run_hook stop ${FW_PREFIX}cluster/rules-pre "running cluster pre-hook stop ..." | 264 | run_hook stop ${FW_PREFIX}cluster/rules-pre "running cluster pre-hook stop ..." |
| 265 | run_hook stop ${FW_PREFIX}rules-pre "running local pre-hook stop ..." | 265 | run_hook stop ${FW_PREFIX}rules-pre "running local pre-hook stop ..." |
| 266 | for FILE in $(find -L /etc/firewall.d/apps.d/ -executable -name '*.pre' -type f 2> /dev/null);do | 266 | for FILE in $(find -L /etc/firewall.d/apps.d/ -executable -name '*.pre' -type f 2> /dev/null);do |
| 267 | run_hook stop ${FILE} "running app pre-hook stop (App: $(basename ${FILE})) ..." | 267 | run_hook stop ${FILE} "running app pre-hook stop (App: $(basename ${FILE})) ..." |
| 268 | done | 268 | done |
| @@ -298,9 +298,9 @@ stop() { | |||
| 298 | done | 298 | done |
| 299 | 299 | ||
| 300 | # run post-hooks | 300 | # run post-hooks |
| 301 | run_hook stop ${FW_PREFIX}global-post "running global post-hook stop ..." | 301 | run_hook stop ${FW_PREFIX}global-post "running global post-hook stop ..." |
| 302 | run_hook stop ${FW_PREFIX}cluster/rules-post "running cluster post-hook stop ..." | 302 | run_hook stop ${FW_PREFIX}cluster/rules-post "running cluster post-hook stop ..." |
| 303 | run_hook stop ${FW_PREFIX}rules-post "running local post-hook stop ..." | 303 | run_hook stop ${FW_PREFIX}rules-post "running local post-hook stop ..." |
| 304 | for FILE in $(find -L /etc/firewall.d/apps.d/ -executable -name '*.post' -type f 2> /dev/null);do | 304 | for FILE in $(find -L /etc/firewall.d/apps.d/ -executable -name '*.post' -type f 2> /dev/null);do |
| 305 | run_hook stop ${FILE} "running app post-hook stop (App: $(basename ${FILE})) ..." | 305 | run_hook stop ${FILE} "running app post-hook stop (App: $(basename ${FILE})) ..." |
| 306 | done | 306 | done |
