I installed iptables on the system outside of docker. And when I listed what rules it had I see this. It looks like the docker rules are listed.
[demo@mail ~]$ sudo iptables -nvL
[sudo] password for demo:
Chain INPUT (policy ACCEPT 22222 packets, 39M bytes)
pkts bytes target prot opt in out source destination
22222 39M MAILCOW 0 -- * * 0.0.0.0/0 0.0.0.0/0
Chain FORWARD (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
11813 2987K MAILCOW 0 -- * * 0.0.0.0/0 0.0.0.0/0
3641K 1152M DOCKER-USER 0 -- * * 0.0.0.0/0 0.0.0.0/0
3641K 1152M DOCKER-ISOLATION-STAGE-1 0 -- * * 0.0.0.0/0 0.0.0.0/0
0 0 ACCEPT 0 -- * docker0 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHED
0 0 DOCKER 0 -- * docker0 0.0.0.0/0 0.0.0.0/0
0 0 ACCEPT 0 -- docker0 !docker0 0.0.0.0/0 0.0.0.0/0
0 0 ACCEPT 0 -- docker0 docker0 0.0.0.0/0 0.0.0.0/0
3013K 1079M ACCEPT 0 -- * br-mailcow 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHED
310K 19M DOCKER 0 -- * br-mailcow 0.0.0.0/0 0.0.0.0/0
318K 53M ACCEPT 0 -- br-mailcow !br-mailcow 0.0.0.0/0 0.0.0.0/0
296K 18M ACCEPT 0 -- br-mailcow br-mailcow 0.0.0.0/0 0.0.0.0/0
Chain OUTPUT (policy ACCEPT 11326 packets, 747K bytes)
pkts bytes target prot opt in out source destination
Chain DOCKER (2 references)
pkts bytes target prot opt in out source destination
5938 350K ACCEPT 6 -- !br-mailcow br-mailcow 0.0.0.0/0 172.22.1.4 tcp dpt:443
5981 352K ACCEPT 6 -- !br-mailcow br-mailcow 0.0.0.0/0 172.22.1.4 tcp dpt:80
0 0 ACCEPT 6 -- !br-mailcow br-mailcow 0.0.0.0/0 172.22.1.5 tcp dpt:3306
518 30312 ACCEPT 6 -- !br-mailcow br-mailcow 0.0.0.0/0 172.22.1.253 tcp dpt:587
0 0 ACCEPT 6 -- !br-mailcow br-mailcow 0.0.0.0/0 172.22.1.253 tcp dpt:465
977 51240 ACCEPT 6 -- !br-mailcow br-mailcow 0.0.0.0/0 172.22.1.253 tcp dpt:25
0 0 ACCEPT 6 -- !br-mailcow br-mailcow 0.0.0.0/0 172.22.1.249 tcp dpt:6379
0 0 ACCEPT 6 -- !br-mailcow br-mailcow 0.0.0.0/0 172.22.1.250 tcp dpt:12345
0 0 ACCEPT 6 -- !br-mailcow br-mailcow 0.0.0.0/0 172.22.1.250 tcp dpt:4190
0 0 ACCEPT 6 -- !br-mailcow br-mailcow 0.0.0.0/0 172.22.1.250 tcp dpt:995
470 28460 ACCEPT 6 -- !br-mailcow br-mailcow 0.0.0.0/0 172.22.1.250 tcp dpt:993
0 0 ACCEPT 6 -- !br-mailcow br-mailcow 0.0.0.0/0 172.22.1.250 tcp dpt:143
0 0 ACCEPT 6 -- !br-mailcow br-mailcow 0.0.0.0/0 172.22.1.250 tcp dpt:110
0 0 ACCEPT 6 -- !br-mailcow br-mailcow 0.0.0.0/0 172.22.1.13 tcp dpt:8983
Chain DOCKER-ISOLATION-STAGE-1 (1 references)
pkts bytes target prot opt in out source destination
0 0 DOCKER-ISOLATION-STAGE-2 0 -- docker0 !docker0 0.0.0.0/0 0.0.0.0/0
318K 53M DOCKER-ISOLATION-STAGE-2 0 -- br-mailcow !br-mailcow 0.0.0.0/0 0.0.0.0/0
3641K 1152M RETURN 0 -- * * 0.0.0.0/0 0.0.0.0/0
Chain DOCKER-ISOLATION-STAGE-2 (2 references)
pkts bytes target prot opt in out source destination
0 0 DROP 0 -- * docker0 0.0.0.0/0 0.0.0.0/0
0 0 DROP 0 -- * br-mailcow 0.0.0.0/0 0.0.0.0/0
318K 53M RETURN 0 -- * * 0.0.0.0/0 0.0.0.0/0
Chain DOCKER-USER (1 references)
pkts bytes target prot opt in out source destination
3641K 1152M RETURN 0 -- * * 0.0.0.0/0 0.0.0.0/0
Chain MAILCOW (2 references)
pkts bytes target prot opt in out source destination
Well I added a docker-user rule . Saved it with the iptables save command . Rebooted and it isn’t there.
Back to the drawing board.
Chain DOCKER-USER (1 references)
pkts bytes target prot opt in out source destination
10380 2768K RETURN 0 -- * * 0.0.0.0/0 0.0.0.0/0
Well I added a docker-user rule . Saved it with the iptables save command . Rebooted and it isn’t there.
Back to the drawing board.
Chain DOCKER-USER (1 references)
pkts bytes target prot opt in out source destination
10380 2768K RETURN 0 -- * * 0.0.0.0/0 0.0.0.0/0
Well I added a docker-user rule . Saved it with the iptables save command . Rebooted and it isn’t there.
Back to the drawing board.
Chain DOCKER-USER (1 references)
pkts bytes target prot opt in out source destination
10380 2768K RETURN 0 -- * * 0.0.0.0/0 0.0.0.0/0