1

I am running Ubuntu 20.04 on WSL 2 along with docker desktop (2.3.0.5) for Windows.

Docker desktop has been setup so that I can access the docker daemon from my Ubuntu shell.

I would like to run the command (see this question for motivation for running the command):

sudo iptables -I DOCKER-USER -j DROP

but when I do I get the error: iptables: No chain/target/match by that name.

According to the docker documentation: "Docker installs two custom iptables chains named DOCKER-USER and DOCKER, and it ensures that incoming packets are always checked by these two chains first."

How can I apply this iptable rule to the docker desktop installation on windows?

vab2048
  • 1,065
  • 8
  • 21

1 Answers1

1

The documentation specifies that it's a feature for a Linux environment.

On Linux, Docker manipulates iptables rules to provide network isolation.

Have you tried using iptables within WSL2 itself? If you're using Docker desktop with the WSL2 Ubuntu integration, it might work.

Eoin
  • 21
  • 2