One of the more difficult pieces involved in Docker networking is iptables
. The iptables
/netfilter integration plays a key role in providing functionality like port publication and outbound masquerading. However, iptables
can be difficult to understand and troubleshoot if you're not already familiar with it. In this recipe, we'll review how to examine the iptables
configuration in detail and verify that connectivity is working as expected.
In this recipe, we'll be using a single Docker host. It is assumed that Docker is installed and in its default configuration. You'll also need root-level access in order to inspect the iptables
rule set.