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:
-
Server availability: try pinging the IP address (
ping <ip>), check route tracing (traceroute <ip>ortracert <ip>). -
Port checking: use
telnet <ip> <port>ornc -zv <ip> <port>to ensure the required port is open and listening. -
Local server settings: verify that the service is running and listening on the required port (
netstat -tulnporss -tulnp). -
Firewalls and security rules: check iptables, firewalld, ufw settings, as well as cloud security groups and ACLs.
-
Routing and NAT: ensure routes are correct, and there are no issues with NAT or port forwarding.
-
Server and network device logs: review application logs, system logs, and network device logs.
-
DNS check: if access is via name, verify correct name resolution (
nslookup,dig). -
Monitoring tools: use tcpdump, Wireshark for traffic analysis.
Example of port check with netcat:
nc -zv 192.168.1.10 80