Addressing, DNS, HTTP and TLS checks, and the order to troubleshoot connectivity.
In the print dialog, choose "Save as PDF" as the destination.
Inspect your host
ip -br addr # interfaces and addresses
ip route # routing table
ip route get 10.20.20.15 # which route a destination uses
ss -tulpn # listening TCP/UDP ports and owners
ss -s # socket summary
CIDR quick reference
CIDR
Addresses
Mask
/32
1
255.255.255.255
/30
4
255.255.255.252
/28
16
255.255.255.240
/24
256
255.255.255.0
/20
4,096
255.255.240.0
/16
65,536
255.255.0.0
/8
16,777,216
255.0.0.0
Private ranges: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16. Cloud providers reserve a few addresses in every subnet.
DNS
dig +short example.com A
dig +short example.com MX
dig @8.8.8.8 example.com # ask a specific resolver
dig +trace example.com # follow delegation from the root
dig -x 192.0.2.10 # reverse lookup
getent hosts example.com # what the system resolver returns
ping -c 3 192.0.2.10 # reachability
traceroute -n 192.0.2.10 # path
mtr -rwc 20 192.0.2.10 # path with loss per hop
nc -zv -w 3 192.0.2.10 5432 # is a TCP port open
tcpdump -ni eth0 port 53 -c 20 # capture a few DNS packets
Troubleshooting order
Name resolves to the expected address? (dig, getent hosts)
Route exists? (ip route get)
Host reachable? (ping, mtr)
Port open? (nc -zv) - timeout means dropped, refused means nothing listening
Firewall rules allow it, in both directions where stateless?
TLS valid and trusted? (openssl s_client)
Application responds correctly? (curl -v)
Firewall quick reference
iptables -S # list rules
nft list ruleset # nftables rules
ufw status verbose
firewall-cmd --list-all
Name resolution and routing
dig example.com A +short
dig @1.1.1.1 example.com MX
dig +trace example.com
dig -x 93.184.216.34 +short
resolvectl status
getent hosts example.com
nslookup example.com
ip route get 8.8.8.8
ip neigh
mtr -rwzc 20 example.com
sudo iptables -S
sudo nft list ruleset
sudo ufw status verbose
sudo firewall-cmd --list-all
sudo tcpdump -ni any host 10.0.0.10 and port 443 -c 50 -w /tmp/cap.pcap
sudo tcpdump -nn -r /tmp/cap.pcap | head
ip -s link show eth0
ethtool eth0
Cautions for network changes
Official references
Read the vendor and project documentation for the full, current detail.