Skip to content

Commit cac221a

Browse files
author
Kristan Kenney
committed
Lock down firewall in demo mode
1 parent 57e1bb0 commit cac221a

File tree

6 files changed

+14
-0
lines changed

6 files changed

+14
-0
lines changed

bin/v-add-firewall-ban

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ is_format_valid 'ip' 'chain'
3333
is_system_enabled "$FIREWALL_SYSTEM" 'FIREWALL_SYSTEM'
3434

3535

36+
# Perform verification if read-only mode is enabled
37+
check_hestia_demo_mode
38+
3639
#----------------------------------------------------------#
3740
# Action #
3841
#----------------------------------------------------------#

bin/v-add-firewall-chain

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ check_args '1' "$#" 'CHAIN [PORT] [PROTOCOL]'
4040
is_format_valid 'chain'
4141
is_system_enabled "$FIREWALL_SYSTEM" 'FIREWALL_SYSTEM'
4242

43+
# Perform verification if read-only mode is enabled
44+
check_hestia_demo_mode
4345

4446
#----------------------------------------------------------#
4547
# Action #

bin/v-add-firewall-rule

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ if [ ! -z "$comment" ]; then
5656
is_format_valid 'comment'
5757
fi
5858

59+
# Perform verification if read-only mode is enabled
60+
check_hestia_demo_mode
5961

6062
#----------------------------------------------------------#
6163
# Action #

bin/v-change-firewall-rule

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ is_system_enabled "$FIREWALL_SYSTEM" 'FIREWALL_SYSTEM'
4848
is_object_valid '../../data/firewall/rules' 'RULE' "$rule"
4949

5050

51+
# Perform verification if read-only mode is enabled
52+
check_hestia_demo_mode
53+
5154
#----------------------------------------------------------#
5255
# Action #
5356
#----------------------------------------------------------#

bin/v-delete-firewall-ban

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ check_args '2' "$#" 'IP CHAIN'
3232
is_format_valid 'ip' 'chain'
3333
is_system_enabled "$FIREWALL_SYSTEM" 'FIREWALL_SYSTEM'
3434

35+
# Perform verification if read-only mode is enabled
36+
check_hestia_demo_mode
3537

3638
#----------------------------------------------------------#
3739
# Action #

bin/v-delete-firewall-chain

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ check_args '1' "$#" 'CHAIN'
3131
is_format_valid 'chain'
3232
is_system_enabled "$FIREWALL_SYSTEM" 'FIREWALL_SYSTEM'
3333

34+
# Perform verification if read-only mode is enabled
35+
check_hestia_demo_mode
3436

3537
#----------------------------------------------------------#
3638
# Action #

0 commit comments

Comments
 (0)