Hero

Programming-Server.com - Network Connection Debugging

How to use tcpdump, tcptrace, and wireshark to diagnose firewall and connection issues.

Check Firewall Guide

Network Connection Debugging

When setting up a Kubernetes cluster with Rancher2, connection problems can sometimes arise due to firewall restrictions.

Identification

To test if a connection is working, use curl: curl -v https://registry-1.docker.io/v2/jenkins/jenkins/manifests/lts.

Debugging Tools

  • Route Analysis: Use ip route get to [IP] or traceroute -n -I [IP] to check paths.
  • Packet Capture: Use tcpdump -i [device] -w tcpdump.out -s 1520 port 443 to capture traffic.
  • Analysis: Use tcptrace tcpdump.out for a summary or tcptrace -o5 tcpdump.out for detailed request info.

"In one case, the issue was a firewall limiting ACK ports to 32.768-65.535 while the connection used ports between 10.000 and 20.000".