Troubleshooting: Networking
Diagnostic sequence for "connection times out" between two lab hosts/containers
- Confirm the target address is actually current. DNS records and DHCP leases both drift in this lab — resolve the hostname fresh rather than trusting a previously-known IP.
- Raw TCP test first, isolating the network layer from application auth:
- If it hangs (not refused): capture simultaneously on the source's loopback and
its physical/external interface while retrying. Answered-but-never-arrives (SYN
goes out, SYN-ACK never comes back to the client) points at a routing problem on
the server side, not a firewall drop on the client side — check the server's
ip rule show/ip route get <dst> from <src> iif <in-iface>before assuming the client's own firewall is at fault. This exact technique found the docker-bridge PBR gap — see TrueNAS Networking Gotchas. ip route getneedsiifto simulate a forwarded packet correctly. Without aniif, the kernel treats the query as a locally-originated packet and can report "unreachable" even when the real (forwarded) packet would route fine — don't trust a bareip route get dst from srcwhen debugging container/bridge traffic.- Check
nftables/iptables-nfttogether, not just one. Some systems (TrueNAS SCALE included) manage iptables rules via theiptables-nftcompat layer —nft list rulesetshows the actual enforced rules and will reveal DOCKER-USER/ DOCKER-FORWARD chains that a plainiptables -Lview can miss context on.
DHCP/Kea specifics
See DHCP & PXE Boot for the DNS-registration flag gotcha and Network Design for why Kubernetes nodes specifically have no reservation and what that costs.
Asymmetric routing (dual-NIC hosts)
Full writeup: config/truenas/asymmetric-routing-fix.md in the main repo. Summary and
pointer: TrueNAS Networking Gotchas.