mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
suricata: Explicitly ignore IPsec traffic unless enabled
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org> Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
This commit is contained in:
committed by
Arne Fitzenreiter
parent
57853da08b
commit
76b6bc3e9d
@@ -111,6 +111,18 @@ generate_fw_rules() {
|
||||
if [ "${!status}" = "on" ]; then
|
||||
# Handle IPsec packets
|
||||
case "${zone}" in
|
||||
RED)
|
||||
# If IPsec is not enabled, skip everything that is IPsec traffic
|
||||
if [ "${ENABLE_IDS_IPSEC}" != "on" ]; then
|
||||
for intf in $(network_get_intfs "${zone}"); do
|
||||
iptables -w -t mangle -A IPS_SCAN_IN \
|
||||
-i "${intf}" -m policy --pol ipsec --dir in -j RETURN
|
||||
iptables -w -t mangle -A IPS_SCAN_OUT \
|
||||
-o "${intf}" -m policy --pol ipsec --dir out -j RETURN
|
||||
done
|
||||
fi
|
||||
;;
|
||||
|
||||
IPSEC)
|
||||
iptables -w -t mangle -A IPS_SCAN_IN \
|
||||
-m policy --pol ipsec --dir in -j MARK --set-mark "$(( IPS_SCAN_MARK ))/$(( IPS_SCAN_MASK ))"
|
||||
|
||||
Reference in New Issue
Block a user