Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
+# Function to flush the firewall chain.
+function flush_fw_chain {
+ # Call iptables and flush the chain
+ iptables -F "$FW_CHAIN"
+}
+
# Function to create the firewall rules to pass the traffic to suricata.
function generate_fw_rules {
cpu_count=$(get_cpu_count)
# Flush the firewall chain.
# Function to create the firewall rules to pass the traffic to suricata.
function generate_fw_rules {
cpu_count=$(get_cpu_count)
# Flush the firewall chain.
- iptables -F "$FW_CHAIN"
# Loop through the array of network zones.
for zone in "${network_zones[@]}"; do
# Loop through the array of network zones.
for zone in "${network_zones[@]}"; do
iptables -A "${FW_CHAIN}" -j MARK --set-xmark "0x0/${MASK}"
}
iptables -A "${FW_CHAIN}" -j MARK --set-xmark "0x0/${MASK}"
}
-# Function to flush the firewall chain.
-function flush_fw_chain {
- # Call iptables and flush the chain
- iptables -F "$FW_CHAIN"
-}
-
case "$1" in
start)
# Get amount of CPU cores.
case "$1" in
start)
# Get amount of CPU cores.