These diagnostic tools help with connection problems:
Test the connection:ping google.com – Checks whether there is an internet connection.ping YOUR-SERVER-IP – Checks whether the server is reachable.
Test DNS resolution:nslookup your-domain.comdig your-domain.com
Show open ports:sudo ss -tlnp – Shows all listening TCP ports.sudo netstat -tlnp – Alternative (you may need sudo apt install net-tools).
Trace the route:traceroute google.com – Shows the network path.mtr google.com – Combines ping and traceroute (interactive).
Test bandwidth:sudo apt install speedtest-clispeedtest-cli
Show network interfaces:ip addr showip route show
Tip: If you suspect a firewall problem, check the rules with sudo ufw status or sudo iptables -L -n.