Compare commits

...

3 Commits

Author SHA1 Message Date
7e2b133946 fix: use ln -sf instead of update-alternatives --set
update-alternatives fails because iptables-nft isn't registered
as an alternative key (only iptables-legacy was registered by
the official Dockerfile). Direct symlink override works.
2026-05-13 12:57:12 -04:00
611e96b306 fix: remove apk add iptables-nft — built-in on Alpine 3.18+
In Alpine 3.18+, the 'iptables' package IS the nftables variant.
iptables-nft is not a separate package. The binary is already in
the base image — only need to flip update-alternatives.
2026-05-13 12:48:51 -04:00
f184ed957c Merge pull request 'fix: update wg-easy to official ghcr image with iptables-nft' (#26) from fix/vpn-iptables-nft-upstream into master
Reviewed-on: #26
2026-05-13 16:37:35 +00:00

View File

@@ -2,9 +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 to iptables-nft so it works on kernels where only nftables # iptables-nft binary exists but isn't registered as an alternative.
# netfilter modules are available (iptable_nat module missing). # Override the alternatives-managed symlinks directly.
RUN apk add --no-cache iptables-nft && \ RUN ln -sf /usr/sbin/iptables-nft /usr/sbin/iptables && \
update-alternatives --set iptables /usr/sbin/iptables-nft && \ ln -sf /usr/sbin/ip6tables-nft /usr/sbin/ip6tables
update-alternatives --set ip6tables /usr/sbin/ip6tables-nft