Troubleshooting Network Connectivity Issues
A systematic approach to diagnosing why your server or service is unreachable.
Step 1 — Can You Ping the Server?
ping -c 4 YOUR_SERVER_IP
- If ping succeeds: the server is online. The issue is service-level.
- If ping fails: the server may be down, the IP is wrong, or ICMP is blocked by firewall.
Step 2 — Trace the Network Path
traceroute YOUR_SERVER_IP # Linux/macOS
# or:
mtr YOUR_SERVER_IP # Better live traceroute (apt install mtr)
Look for where packets stop responding — that indicates the problem hop.
Step 3 — Is the Service Listening?
ss -tulpn | grep 80 # Is Nginx listening on port 80?
Step 4 — Is the Firewall Blocking It?
ufw status # Check UFW rules
iptables -L -n -v | head -30 # Raw iptables rules
Step 5 — Test Port Connectivity from Outside
nc -zv YOUR_SERVER_IP 80 # Test TCP port 80
Step 6 — Check DNS Resolution
dig yourdomain.com
nslookup yourdomain.com
Compare the resolved IP with your server's actual IP.
Step 7 — Check Service Logs
journalctl -u nginx -n 50
tail -f /var/log/nginx/error.log
Step 8 — Review Network Interface Stats
ip -s link show eth0
Look at RX/TX error and drop counts — high numbers indicate a hardware or driver problem.