Appendix_B_tcpdump_lab
Appendix B: Docker Network Sniffing with tcpdump Lab
1. Create a Custom tcpdump Image
FROM ubuntu RUN apt-get update && apt-get install -y tcpdump # Default command captures traffic on eth0. # You can override this or add more specific tcpdump arguments at runtime. CMD ["tcpdump", "-i", "eth0", "-n", "-s0", "-A"]docker build -t my-tcpdump .
2. Set Up a Demo Network and Service
docker network create demo-netdocker run -d --network demo-net --name wwwnginx nginx
3. Generate Traffic
4. Sniffing Traffic
Last updated