Merge pull request 'fix: use ln -sf instead of update-alternatives --set for iptables-nft' (#28) from fix/vpn-iptables-nft-v3 into master

Reviewed-on: #28
This commit is contained in:
2026-05-13 16:59:50 +00:00

View File

@@ -2,8 +2,8 @@
# Fixes crash-loop when host kernel lacks legacy iptable_nat module. # Fixes crash-loop when host kernel lacks legacy iptable_nat module.
FROM ghcr.io/wg-easy/wg-easy:latest FROM ghcr.io/wg-easy/wg-easy:latest
# The upstream image defaults to iptables-legacy via update-alternatives. # The upstream image registers only iptables-legacy with update-alternatives.
# Switch iptables to the nftables backend (already provided by the 'iptables' # iptables-nft binary exists but isn't registered as an alternative key.
# package on Alpine 3.18+). No apk add needed — iptables-nft is built-in. # Override the alternatives-managed symlinks directly.
RUN update-alternatives --set iptables /usr/sbin/iptables-nft && \ RUN ln -sf /usr/sbin/iptables-nft /usr/sbin/iptables && \
update-alternatives --set ip6tables /usr/sbin/ip6tables-nft ln -sf /usr/sbin/ip6tables-nft /usr/sbin/ip6tables