Add rdr pf conf check

Prevent shutdown/rdr command stalls.
This commit is contained in:
JRGTH
2023-09-07 08:34:28 -04:00
parent 61e7084b33
commit d6b5733d48

View File

@@ -88,10 +88,12 @@ check_jail_validity() {
fi fi
# Check if ext_if is defined in pf.conf # Check if ext_if is defined in pf.conf
if [ -n "${bastille_pf_conf}" ]; then
EXT_IF=$(grep "^[[:space:]]*${bastille_network_pf_ext_if}[[:space:]]*=" ${bastille_pf_conf}) EXT_IF=$(grep "^[[:space:]]*${bastille_network_pf_ext_if}[[:space:]]*=" ${bastille_pf_conf})
if [ -z "${EXT_IF}" ]; then if [ -z "${EXT_IF}" ]; then
error_exit "bastille_network_pf_ext_if (${bastille_network_pf_ext_if}) not defined in pf.conf" error_exit "bastille_network_pf_ext_if (${bastille_network_pf_ext_if}) not defined in pf.conf"
fi fi
fi
} }
# function: write rule to rdr.conf # function: write rule to rdr.conf