This article is a continuation of my previous post, 11. A Brief Introduction to Conntrack .
In this piece, we will dive deeper into the impact of conntrack on Docker networking. Furthermore, we will explore how the TCP three-way handshake and four-way handshakes (teardown) operate within this context.
<aside> π‘
In this experiment, we will observe how Docker utilizes conntrack to establish filter table rules (stateful connections), which not only optimizes performance but also enhances security.
We will explore the contributions of conntrack through three sub-experiments:
nc command to observe packet changes during TCP establishment and analyze the packet transitions during the three-way handshake and four-way teardown.curl command to observe packet changes during HTTP Requests and Responses.
For this session, we will use iximiuz Labs' flexbox to set up two machines.
box-01, select docker as the Rootfs so that Docker comes pre-installed on the machine.box-02, select ubuntu-24-04, which will serve as the client to access the Nginx server container on box-01.
First, once the environment initialization is complete, let's observe the iptables filter table on box-01. You will see the content as shown in the figure on the left.
To observe how packets traverse the filter table, we will start an Nginx web server on the box-1 machine.