docker network create --driver bridge container-net
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug eno1
iface eno1 inet dhcp
post-up /etc/iptables-docker-bridge.sh
chmod a+x /etc/iptables-docker-bridge.sh
iptables -L FORWARD -v -n
Default Docker Rules:
Chain FORWARD (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
43060 26M DOCKER-USER 0 -- * * 0.0.0.0/0 0.0.0.0/0
43060 26M 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
26303 23M ACCEPT 0 -- * br-caed2ff56793 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHED
130 49312 DOCKER 0 -- * br-caed2ff56793 0.0.0.0/0 0.0.0.0/0
16627 2975K ACCEPT 0 -- br-caed2ff56793 !br-caed2ff56793 0.0.0.0/0 0.0.0.0/0
129 49264 ACCEPT 0 -- br-caed2ff56793 br-caed2ff56793 0.0.0.0/0 0.0.0.0/0
Added Docker Rules:
0 0 ACCEPT 0 -- br-caed2ff56793 eno1 0.0.0.0/0 0.0.0.0/0
109 7000 ACCEPT 0 -- eno1 br-caed2ff56793 0.0.0.0/0 0.0.0.0/0
0 0 ACCEPT 0 -- eno1 br-caed2ff56793 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED