Add parameter 'allow_gw_to_local_service' also for IPv6.
Same as the IPv4 variant, but fields are separated by comma: "local-ip,port[-port],protocol [..]". The array is already built in the shared post_decalrations.conf. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a3d6d6ab99
commit
ff58963dea
2 files changed
+56
No files matched your search
@@ -1964,6 +1964,35 @@ fi
|
||||
|
||||
|
||||
|
||||
# ---
|
||||
# - Allow gateway itself to local service
|
||||
# ---
|
||||
|
||||
echononl "\tAllow gateway itself to local service"
|
||||
|
||||
if [[ ${#allow_gw_to_local_service_arr[@]} -gt 0 ]] ; then
|
||||
|
||||
for _val in "${allow_gw_to_local_service_arr[@]}" ; do
|
||||
|
||||
IFS=',' read -a _val_arr <<< "${_val}"
|
||||
|
||||
if [[ "${_val_arr[1]}" == *"-"* ]]; then
|
||||
_port="${_val_arr[1]//-/:}"
|
||||
else
|
||||
_port=${_val_arr[1]}
|
||||
fi
|
||||
|
||||
$ip6t -A OUTPUT -p ${_val_arr[2]} -d ${_val_arr[0]} --dport ${_port} -m conntrack --ctstate NEW -j ACCEPT
|
||||
|
||||
done
|
||||
|
||||
echo_done
|
||||
else
|
||||
echo_skipped
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# ---
|
||||
# - Separate local networks
|
||||
# ---
|
||||
|
||||
Reference in new issue
Block a user