Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7457d23fa8 | ||
|
|
0c333375a5 | ||
|
|
5783547bd3 |
No files matched your search
@@ -42,7 +42,11 @@ ArgoCD homelab project
|
||||
|
||||
| Application | Status |
|
||||
| :--- | :---: |
|
||||
| **airtrail** | [](https://ag.hexor.cy/applications/argocd/airtrail) |
|
||||
| **amnezia** | [](https://ag.hexor.cy/applications/argocd/amnezia) |
|
||||
| **comfyui** | [](https://ag.hexor.cy/applications/argocd/comfyui) |
|
||||
| **doka2-lobby-list** | [](https://ag.hexor.cy/applications/argocd/doka2-lobby-list) |
|
||||
| **firefly-iii** | [](https://ag.hexor.cy/applications/argocd/firefly-iii) |
|
||||
| **furumi** | [](https://ag.hexor.cy/applications/argocd/furumi) |
|
||||
| **gitea** | [](https://ag.hexor.cy/applications/argocd/gitea) |
|
||||
| **greece-notifier** | [](https://ag.hexor.cy/applications/argocd/greece-notifier) |
|
||||
@@ -52,7 +56,9 @@ ArgoCD homelab project
|
||||
| **jellyfin** | [](https://ag.hexor.cy/applications/argocd/jellyfin) |
|
||||
| **k8s-secrets** | [](https://ag.hexor.cy/applications/argocd/k8s-secrets) |
|
||||
| **khm** | [](https://ag.hexor.cy/applications/argocd/khm) |
|
||||
| **lan-play** | [](https://ag.hexor.cy/applications/argocd/lan-play) |
|
||||
| **lidarr** | [](https://ag.hexor.cy/applications/argocd/lidarr) |
|
||||
| **llamacpp** | [](https://ag.hexor.cy/applications/argocd/llamacpp) |
|
||||
| **matrix** | [](https://ag.hexor.cy/applications/argocd/matrix) |
|
||||
| **mtproxy** | [](https://ag.hexor.cy/applications/argocd/mtproxy) |
|
||||
| **n8n** | [](https://ag.hexor.cy/applications/argocd/n8n) |
|
||||
|
||||
@@ -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}" \
|
||||
@@ -270,9 +276,13 @@ data:
|
||||
exit 1
|
||||
fi
|
||||
|
||||
FIRST_FORWARD_RULE="$("${IPTABLES[@]}" -S FORWARD | grep '^-A FORWARD ' | sed -n '1p')"
|
||||
[[ "${FIRST_FORWARD_RULE}" == *"--comment amneziawg-forward-jump"* ]]
|
||||
[[ "${FIRST_FORWARD_RULE}" == *"-j ${FORWARD_CHAIN}"* ]]
|
||||
# The amneziawg FORWARD jump must be present. firewall-up inserts it at
|
||||
# position 1, but CNI controllers (e.g. kube-router) legitimately re-assert
|
||||
# their own jump ahead of it. Requiring the strict first position makes the
|
||||
# readiness probe flap as the two fight over rule order. Isolation still holds
|
||||
# as long as the jump is traversed and no earlier rule accepts awg0-to-awg0
|
||||
# traffic (kube-router's chain returns non-pod traffic without a decision).
|
||||
"${IPTABLES[@]}" -C FORWARD -m comment --comment amneziawg-forward-jump -j "${FORWARD_CHAIN}"
|
||||
ACTIVE_POLICY="$("${IPTABLES[@]}" -S "${FORWARD_CHAIN}" 2>/dev/null \
|
||||
| awk '$1 == "-A" && $3 == "-j" && $4 ~ /^AMNEZIAWG-POLICY-[AB]$/ { print $4; exit }')"
|
||||
[ -n "${ACTIVE_POLICY}" ]
|
||||
|
||||
Reference in new issue
Block a user