Back to Blog

How to Troubleshoot Network Problems on a VPS

How to Troubleshoot Network Problems on a VPS
Command of the Day
mtr --report -c 10 1.1.1.1

What it does: Runs a non-interactive Matt's Traceroute analysis sending 10 probes per hop and outputs a summary report of latency and loss.

Network connectivity issues—such as intermittent packet loss, high latency spikes, DNS resolution failures, or unreachable services—can disrupt server applications. When network problems occur, systematically testing each layer of the network stack helps pinpoint whether the failure lies within the server, firewall rules, local gateway, or upstream ISP routing.

In this guide, we provide a complete diagnostic workflow to troubleshoot network issues on your RivinCloud VPS.


1. The 5-Step Network Diagnostic Workflow

[Step 1] Local Interface Check (ip addr / ip route)
   │
[Step 2] Local Gateway Ping (ping default gateway)
   │
[Step 3] External IP Connectivity (ping 1.1.1.1)
   │
[Step 4] DNS Resolution Check (dig / nslookup)
   │
[Step 5] Hop-by-Hop Path Analysis (mtr / traceroute)

2. Step-by-Step Diagnostic Execution

Step 1: Verify Local Interface & Routing Table

Check if your network interface is active and has an assigned IP address:

ip addr show
ip route show

Ensure the default via line lists your correct default gateway IP.

Step 2: Test External IP Connectivity

Rule out DNS issues by pinging a reliable public IP address (such as Cloudflare 1.1.1.1 or Google 8.8.8.8):

ping -c 4 1.1.1.1
  • If pinging 1.1.1.1 succeeds but ping google.com fails, your issue is strictly DNS Resolution.

Step 3: Verify DNS Resolution

Check if your server can query domain names:

dig +short google.com

If DNS fails, inspect /etc/resolv.conf to ensure valid nameservers are configured:

nameserver 1.1.1.1
nameserver 8.8.8.8

Command of the Day: mtr

mtr (Matt's Traceroute) combines the functionality of traceroute and ping into a single dynamic network diagnostic tool that probes every router hop along the path.

Syntax

mtr [options] [target_hostname_or_ip]

Practical Example

# Generate a clean 10-probe text report to a target destination
mtr --report -c 10 1.1.1.1

Sample Output Report

Start: 2026-09-28T14:35:00+0000
HOST: vps01.rivincloud.in    Loss%   Snt   Last   Avg  Best  Wrst StDev
  1.|-- gateway.rivincloud.in 0.0%    10    0.4   0.4   0.3   0.6   0.1
  2.|-- core1.provider.net    0.0%    10    1.2   1.4   1.1   2.0   0.3
  3.|-- transit.level3.net    0.0%    10   12.5  12.8  12.1  14.2   0.6
  4.|-- one.one.one.one       0.0%    10   12.2  12.3  12.0  12.8   0.2

Explanation

  • Loss%: Shows if a specific intermediate router is dropping packets.
  • Avg / Wrst: Shows average and worst-case latency per hop to isolate latency spikes.

3. Isolating Port Accessibility Issues

If the server is pingable but a web page or game server refuses to connect:

A. Check Local Listener

Verify the service is actually listening on the port:

sudo ss -tulpn | grep :80

B. Check Firewall Rules

Verify UFW is not dropping packets:

sudo ufw status

Common Mistakes

  • Misinterpreting ICMP Rate-Limiting on Intermediate Hops in MTR: Some intermediate core routers drop ICMP ping probes to prioritize transit traffic. If Hop 4 shows 20% loss but Hop 5 through Hop 10 show 0% loss, there is NO actual network packet loss!
  • Editing /etc/resolv.conf manually on systemd-resolved systems: On modern Ubuntu, changes to /etc/resolv.conf are overwritten unless updated via netplan or resolvectl.

Troubleshooting

  • Diagnosing TCP port reachability from a remote computer:
    nc -zv your-vps-ip 80
    

Best Practices

  • Run mtr --report whenever investigating user latency complaints and share the output with network administrators.
  • Maintain secondary DNS resolvers (1.1.1.1 and 8.8.8.8) for redundancy.

Frequently Asked Questions

What is MTU and how can a wrong MTU break connections?

MTU (Maximum Transmission Unit) defines the maximum packet size (typically 1500 bytes). If a network path requires smaller packets (e.g. 1420 bytes for VPNs) and PMTUD is blocked, large file downloads will freeze.


Conclusion

Systematic network diagnostics with ip, ping, dig, and mtr isolates network failures quickly. Keep your RivinCloud VPS network operating smoothly!