MikeWang000000 / Natter

Expose your TCP/UDP port behind full-cone NAT to the Internet.
GNU General Public License v3.0
1.31k stars 107 forks source link

使用 nattertool/natter:alpine 镜像,-m iptables 实际修改变为 nftables #51

Closed MikeWang000000 closed 3 months ago

MikeWang000000 commented 4 months ago

原因在于 Alpine Linux 的变更:

main/iptables: make default iptables* links to nft variant https://gitlab.alpinelinux.org/alpine/aports/-/commit/f87a191922955bcf5c5f3fc66a425263a4588d48

目前构建的 Docker 镜像已指向 nft 变体导致功能发生改变。 需要修正 Dockerfile。


用例:

$ docker run --rm --net=host --cap-add=NET_ADMIN --cap-add=NET_RAW nattertool/natter:alpine -m iptables
2024-02-20 12:53:39 [I] Natter v2.0.0-rc2
# Warning: iptables-legacy tables present, use iptables-legacy to see them
iptables v1.8.10 (nf_tables): Could not fetch rule set generation id: Invalid argument
OSError: iptables >= (1, 4, 1) not available

显示调用为 iptables v1.8.10 (nf_tables)