Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iptables: No chain/target/match error (with docker network create)

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?

like image 626
Christian68 Avatar asked Dec 13 '18 16:12

Christian68


3 Answers

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.

like image 78
BMitch Avatar answered Nov 12 '22 15:11

BMitch


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

like image 24
Nevolution Avatar answered Nov 12 '22 15:11

Nevolution


sudo systemctl restart docker.socket
like image 10
Mohamed Farouk Avatar answered Nov 12 '22 14:11

Mohamed Farouk