fix: use ln -sf instead of update-alternatives --set for iptables-nft #28

Merged
gortium merged 1 commits from fix/vpn-iptables-nft-v3 into master 2026-05-13 16:59:51 +00:00
Collaborator

Problem

update-alternatives --set /usr/sbin/iptables-nft fails because the Alpine iptables package doesn't register the nftables binary as an alternative key — only iptables-legacy was registered by the official Dockerfile via --install.

Error:

update-alternatives: error: alternative /usr/sbin/iptables-nft for iptables not registered; not setting

Fix

Use ln -sf to directly replace the alternatives-managed symlinks. The /usr/sbin/iptables-nft binary is present (provided by the iptables package), just not registered in the alternatives database.

## Problem `update-alternatives --set /usr/sbin/iptables-nft` fails because the Alpine `iptables` package doesn't register the nftables binary as an alternative key — only `iptables-legacy` was registered by the official Dockerfile via `--install`. Error: ``` update-alternatives: error: alternative /usr/sbin/iptables-nft for iptables not registered; not setting ``` ## Fix Use `ln -sf` to directly replace the alternatives-managed symlinks. The `/usr/sbin/iptables-nft` binary is present (provided by the `iptables` package), just not registered in the alternatives database.
Hermes added 1 commit 2026-05-13 16:58:50 +00:00
update-alternatives --set fails because the base image only registers
iptables-legacy as an alternative. The iptables-nft binary (/usr/sbin/iptables-nft)
exists but isn't in the alternatives database. Direct ln -sf bypasses this.
gortium merged commit 29ae32a1c5 into master 2026-05-13 16:59:51 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: gortium/compose#28
No description provided.