How -p 8080:80 reaches your container
Select an icon to see what it is.
Step 4 of 6
A packet arrives at the host
The laptop (192.168.1.10) opens a connection with curl and sends a TCP SYN to 10.0.0.20:8080. The host kernel receives it before it makes any routing decision.
$ curl http://10.0.0.20:8080TCP SYN as it arrives (IPv4 20 B + TCP 20 B)
192.168.1.10:54321 -> 10.0.0.20:8080 flags=SYN len=40
IPv4 · 20 B
Version 4b
4
IHL 4b
5 (20 B)
DSCP/ECN 8b
0
Total length 16b
40
Identification 16b
0x3a5c
Flags 3b
DF
Fragment offset 13b
0
TTL 8b
63
Protocol 8b
6 (TCP)
Header checksum 16b
0x35ae
Source IP 32b
192.168.1.10
Destination IP 32b
10.0.0.20
TCP (simplified: options omitted) · 20 B
Source port 16b
54321
Destination port 16b
8080
Sequence number 32b
0x1a2b3c4d
Acknowledgment number 32b
0
Data offset 4b
5 (20 B)
Reserved 3b
0
Flags 9b
SYN
Window 16b
64240
Checksum 16b
0x9ef1
Urgent pointer 16b
0