Fixed AWG scripts
Check with kubeconform / lint (push) Successful in 12s
Update Kubernetes Services Wiki / Generate and Update K8s Wiki (push) Successful in 9s
Auto-update README / Generate README and Create MR (push) Successful in 6s

This commit is contained in:
ab
2026-09-17 17:38:30 +03:00
parent 29c5b00c16
commit 5783547bd3
+12 -6
View File
@@ -96,12 +96,18 @@ data:
[[ "${source}" == \#* ]] && continue
if [ -n "${extra:-}" ] \
|| ! valid_ipv4_32 "${source}" \
|| ! valid_ipv4_32 "${destination:-}" \
|| ! routed_through_awg0 "${source}" \
|| ! routed_through_awg0 "${destination}"; then
echo "Invalid or out-of-tunnel policy line: ${source:-} ${destination:-} ${extra:-}" >&2
"${IPTABLES[@]}" -F "${inactive}"
return 1
|| ! valid_ipv4_32 "${destination:-}"; then
echo "Skipping malformed policy line: ${source:-} ${destination:-} ${extra:-}" >&2
continue
fi
# A pair whose endpoints are not (yet) routed through awg0 is skipped
# rather than fatal. During interface bring-up the awg0 route may not be
# in place, and a missing ACCEPT simply leaves the pair subject to the
# client-isolation DROP below (fail-closed) instead of aborting the whole
# policy and crash-looping the container.
if ! routed_through_awg0 "${source}" || ! routed_through_awg0 "${destination}"; then
echo "Skipping out-of-tunnel policy pair: ${source} ${destination}" >&2
continue
fi
"${IPTABLES[@]}" -A "${inactive}" \
-i awg0 -o awg0 -s "${source}" -d "${destination}" \