Verifying published ports and outbound masquerading

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.

Getting ready

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.

How to do it…

As we've seen in earlier chapters, ...

Get Docker Networking Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.