Sobes.tech
Senior

How to debug a problem with network inaccessibility of the server?

sobes.tech AI

Answer from AI

To debug network inaccessibility of the server, sequentially check:

  1. Server availability: try pinging the IP address (ping <ip>), check route tracing (traceroute <ip> or tracert <ip>).

  2. Port checking: use telnet <ip> <port> or nc -zv <ip> <port> to ensure the required port is open and listening.

  3. Local server settings: verify that the service is running and listening on the required port (netstat -tulnp or ss -tulnp).

  4. Firewalls and security rules: check iptables, firewalld, ufw settings, as well as cloud security groups and ACLs.

  5. Routing and NAT: ensure routes are correct, and there are no issues with NAT or port forwarding.

  6. Server and network device logs: review application logs, system logs, and network device logs.

  7. DNS check: if access is via name, verify correct name resolution (nslookup, dig).

  8. Monitoring tools: use tcpdump, Wireshark for traffic analysis.

Example of port check with netcat:

nc -zv 192.168.1.10 80