Running docker container : iptables: No chain/target/match by that name
Solution 1:
I faced the same problem in a docker-compose setup.
1. Clear all chains:
sudo iptables -t filter -F
sudo iptables -t filter -X
2. Then restart Docker Service:
systemctl restart docker
Solution 2:
I believe the issue is within these lines:
iptables -t filter -F
iptables -t filter -X
which indeeds clear all chains. One possible solution is to launch the docker daemon after the iptables setup script. Otherwise you will need to explicitly removes chains you're interested in.
Solution 3:
Faced the same issue on RHEL 7. Restarting docker service worked for me without a need to flush any iptable
rules.
$ sudo systemctl restart docker
Solution 4:
I get same problem, after installing firewalld.
I fix it by:
service firewalld stop
service docker restart