How to block ip on docker?

Viewed 327

I have a docker machine. There are lots of centos containers on the docker. I wanna block an ip from iptables (on the docker machine ). Then, the centos containers will be blocked.

I try these but don't work

iptables -A DOCKER-USER -s 192.168.0.210 -j DROP

and

iptables -A INPUT -s 192.168.0.210 -j REJECT

how can I resolve this problem?

0 Answers
Related