40

When creating a network (docker network create -d bridge my-nw), I obtained this error in response:

Error response from daemon: Failed to Setup IP tables: Unable to enable SKIP DNAT rule: (iptables failed: iptables --wait -t nat -I DOCKER -i br-bedba04c7349 -j RETURN: iptables: No chain/target/match by that name.

What do I need to do to go around? Docker or IP Table modifications?

rogerdeuce
  • 1,471
  • 6
  • 31
  • 48
Christian68
  • 845
  • 4
  • 13
  • 24

3 Answers3

80

Something has deleted the docker iptables entries. Docker will recreate them if you restart it (systemctl restart docker). You'll want to disable anything else that manages iptables to prevent this from happening in the future.

BMitch
  • 231,797
  • 42
  • 475
  • 450
  • This command restarts the whole docker but you can just restart docker.socket – behrad Feb 01 '23 at 07:09
  • @behrad Restarting the socket restarts the docker daemon, it's a dependency for running the engine. The code to reset the firewall settings is part of the engine startup. – BMitch Feb 01 '23 at 14:48
18
sudo systemctl restart docker.socket
Mohamed Farouk
  • 957
  • 1
  • 13
  • 29
3

This can happen when you accidently flush all your chains and tables, for example using iptables --flush. Simply restart your docker daemon as mentioned by BMitch

Nevolution
  • 41
  • 2