mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 19:23:24 +02:00
suricata: Use device ppp0 if PPPoE dialin is used.
Fixes #12058. Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org> Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
committed by
Arne Fitzenreiter
parent
a86bc6dfc6
commit
e8a28edbea
@@ -18,6 +18,7 @@
|
|||||||
PATH=/usr/local/sbin:/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin; export PATH
|
PATH=/usr/local/sbin:/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin; export PATH
|
||||||
|
|
||||||
eval $(/usr/local/bin/readhash /var/ipfire/suricata/settings)
|
eval $(/usr/local/bin/readhash /var/ipfire/suricata/settings)
|
||||||
|
eval $(/usr/local/bin/readhash /var/ipfire/ethernet/settings)
|
||||||
|
|
||||||
# Name of the firewall chain.
|
# Name of the firewall chain.
|
||||||
FW_CHAIN="IPS"
|
FW_CHAIN="IPS"
|
||||||
@@ -65,9 +66,18 @@ function generate_fw_rules {
|
|||||||
|
|
||||||
# Check if the IDS is enabled for this network zone.
|
# Check if the IDS is enabled for this network zone.
|
||||||
if [ "${!enable_ids_zone}" == "on" ]; then
|
if [ "${!enable_ids_zone}" == "on" ]; then
|
||||||
# Generate name of the network interface.
|
# Check if the current processed zone is "red" and the configured type is PPPoE dialin.
|
||||||
network_device=$zone
|
if [ "$zone" == "red" ] && [ "$RED_TYPE" == "PPPOE" ]; then
|
||||||
network_device+="0"
|
# Set device name to ppp0.
|
||||||
|
network_device="ppp0"
|
||||||
|
else
|
||||||
|
# Generate variable name which contains the device name.
|
||||||
|
zone_name="$zone_upper"
|
||||||
|
zone_name+="_DEV"
|
||||||
|
|
||||||
|
# Grab device name.
|
||||||
|
network_device=${!zone_name}
|
||||||
|
fi
|
||||||
|
|
||||||
# Assign NFQ_OPTS
|
# Assign NFQ_OPTS
|
||||||
NFQ_OPTIONS=$NFQ_OPTS
|
NFQ_OPTIONS=$NFQ_OPTS
|
||||||
|
|||||||
Reference in New Issue
Block a user