Skip to content

Why Your Cloud VM Has No Internet Access (And How to Fix It)

A practical checklist for troubleshooting internet connectivity issues on cloud virtual machines.

You’ve deployed a cloud virtual machine, but it cannot access the internet.

The VM is running, its network interface is active, and it has an IP address. So what’s wrong?

Here are five areas I would check when troubleshooting this issue.

1. Check the Default Route

First, verify whether the VM has a default gateway.

On Linux:

bash
ip route

Look for a route similar to:

text
default via 192.168.1.1 dev eth0

Without a valid default route, the VM may be unable to reach destinations outside its local subnet.

2. Verify Internet Egress

A private IP address alone does not guarantee internet access.

Depending on your cloud architecture, outbound connectivity may require:

  • A NAT gateway.
  • A public IP address with a valid internet route.
  • An internet gateway or equivalent cloud networking service.

Check that the subnet’s route table directs internet-bound traffic to the appropriate next hop.

3. Inspect Security Groups and Firewalls

Security policies may block outbound traffic.

Verify the cloud security group, network ACLs (if applicable), and the operating system firewall.

Pay particular attention to outbound TCP ports 80 and 443, DNS traffic, and return traffic.

4. Test DNS Resolution

Sometimes the VM has internet connectivity, but DNS resolution is failing.

Try:

bash
getent hosts example.com

Then test connectivity to an IP address:

bash
curl -I --connect-timeout 5 https://1.1.1.1

If IP-based connectivity works but domain resolution fails, investigate the configured DNS servers and resolver settings.

5. Check the VM’s Network Configuration

Inspect the network interface and assigned addresses:

bash
ip addr
ip route

Confirm that the interface is up, the IP configuration is correct, and the expected gateway is reachable.

Final Thoughts

When troubleshooting cloud connectivity, I prefer working through the network path systematically:

VM → Subnet → Route Table → NAT/Internet Gateway → External Network

This approach helps narrow down the problem instead of randomly changing firewall rules or network settings.