Higher priority for allowing traffic from / to lo device.

This commit is contained in:
Christoph 2024-04-26 11:40:57 +02:00
parent 71e803388a
commit 4388ab6a68
2 changed files with 45 additions and 34 deletions

View File

@ -274,14 +274,16 @@ if [[ ${#ext_if_arr[@]} -lt 1 ]] ; then
fatal "No extern Interface is configured!"
fi
echo
# -------------
# --- Pass through Devices Interfaces (not firewalled)
# -------------
echononl "\tPass through Devices (not firewalled)"
if [[ ${#unprotected_if_arr[@]} -gt 0 ]]; then
echononl "\tPass through Devices (not firewalled)"
for _dev in ${unprotected_if_arr[@]} ; do
if $log_unprotected || $log_all ; then
$ip6t -A INPUT -i $_dev -j $LOG_TARGET $tag_log_prefix "$log_prefix Not firewalled ${_dev}: "
@ -299,9 +301,29 @@ if [[ ${#unprotected_if_arr[@]} -gt 0 ]]; then
fi
done
echo_done
else
echo_skipped
fi
# -------------
# --- Traffic generally allowed
# -------------
echononl "\tLoopback device generally allowed.."
# ---
# - Loopback device
# ---
$ip6t -A INPUT -i lo -j ACCEPT
$ip6t -A OUTPUT -o lo -j ACCEPT
echo_done
echo
# -------------
# --- Block IPs / Networks / Interfaces
@ -820,22 +842,6 @@ echo_done
echo
# -------------
# --- Traffic generally allowed
# -------------
echononl "\tLoopback device generally allowed.."
# ---
# - Loopback device
# ---
$ip6t -A INPUT -i lo -j ACCEPT
$ip6t -A OUTPUT -o lo -j ACCEPT
echo_done
# ---
# - Already established connections
# ---

View File

@ -618,14 +618,15 @@ else
echo_skipped
fi
echo
# -------------
# --- Pass through Devices Interfaces (not firewalled)
# -------------
echononl "\tPass through Devices (not firewalled)"
if [[ ${#unprotected_if_arr[@]} -gt 0 ]]; then
echononl "\tPass through Devices (not firewalled)"
for _dev in ${unprotected_if_arr[@]} ; do
if $log_unprotected || $log_all ; then
$ipt -A INPUT -i $_dev -j $LOG_TARGET $tag_log_prefix "$log_prefix Not firewalled ${_dev}: "
@ -643,9 +644,29 @@ if [[ ${#unprotected_if_arr[@]} -gt 0 ]]; then
fi
done
echo_done
else
echo_skipped
fi
# -------------
# --- Traffic generally allowed
# -------------
echononl "\tLoopback device generally allowed.."
# ---
# - Loopback device
# ---
$ipt -A INPUT -i lo -j ACCEPT
$ipt -A OUTPUT -o lo -j ACCEPT
echo_done
echo
# -------------
# --- Block IPs / Networks / Interfaces
@ -1455,22 +1476,6 @@ echo_done
echo
# -------------
# --- Traffic generally allowed
# -------------
echononl "\tLoopback device generally allowed.."
# ---
# - Loopback device
# ---
$ipt -A INPUT -i lo -j ACCEPT
$ipt -A OUTPUT -o lo -j ACCEPT
echo_done
# ---
# - Already established connections
# ---