I have installed Tumbleweed in WSL2 and want to use Docker in it. On starting Docker, it tries to create an iptables rule using the following command:
iptables --wait -t nat -A PREROUTING -m addrtype --dst-type LOCAL -j DOCKER
This fails with the following error:
iptables v1.8.11 (legacy): unknown option "--dst-type"
Does anybody know why?
The --dst-type
option is listed in the help text when I call iptables -m addrtype --help
.
On Ubuntu 24.04 in WSL2, the command works perfectly.
Where is the difference?
Works for me on WSL2
andrei@tumbleweed:~> sudo iptables --wait -t nat -A PREROUTING -m addrtype --dst-type LOCAL -j DOCKER
andrei@tumbleweed:~> which iptables
/usr/sbin/iptables
andrei@tumbleweed:~> rpm -qf /usr/sbin/iptables
iptables-1.8.11-1.1.x86_64
andrei@tumbleweed:~>
@arvidjaar Thanks for your reply. Weird! Can you also tell me the output of wsl --version
in Windows?
PS C:\Users\Administrator> wsl --version
WSL version: 2.3.26.0
Kernel version: 5.15.167.4-1
WSLg version: 1.0.65
MSRDC version: 1.2.5620
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release
Windows version: 10.0.19045.5131
PS C:\Users\Administrator>