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]ortraceroute -n -I [IP]to check paths. - Packet Capture: Use
tcpdump -i [device] -w tcpdump.out -s 1520 port 443to capture traffic. - Analysis: Use
tcptrace tcpdump.outfor a summary ortcptrace -o5 tcpdump.outfor 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".
