allow_all_ext_traffic_to_local_service: accept extern interface instead of address.

If an extern interface (e.g. $ext_if_static_1) is given as first field,
only an INPUT rule for traffic to the gateway itself on that interface
is created - no address lookup needed. Implemented for IPv4 and IPv6.

Also:
- ip6t-firewall-gateway: check gateway_ipv6_address_arr (was
  gateway_ipv4_address_arr) when detecting own gateway addresses.
- main_ipv*.conf.sample: document how to allow incoming traffic for a
  reverse proxy in 'allow_gw_to_local_service', fix example parameter
  name of 'allow_all_ext_traffic_to_local_service'.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
chrisandClaude Opus 5.5 committed 2026-11-19 01:27:55 +01:00
1 parent 954dce1bf0
commit a57980f3f2
4 files changed
+77 -7

No files matched your search

+8
View File
@@ -2150,6 +2150,14 @@ if [[ ${#allow_all_ext_traffic_to_local_service_arr[@]} -gt 0 ]] \
IFS=':' read -a _val_arr <<< "${_val}"
# - An extern interface is given instead of an address (e.g. $ext_if_static_1):
# - allow traffic to the gateway itself coming in on that interface.
# -
if containsElement "${_val_arr[0]}" "${ext_if_arr[@]}" ; then
$ipt -A INPUT -i ${_val_arr[0]} -p ${_val_arr[2]} --dport ${_val_arr[1]} -m conntrack --ctstate NEW -j ACCEPT
continue
fi
for _dev in ${ext_if_arr[@]} ; do
if containsElement "${_val_arr[0]}" "${gateway_ipv4_address_arr[@]}" ; then