Check a virtual machine's internet access

Open the internet access check of an instance, read the result of each of its six steps, and fix the first step that fails.

The internet access check follows the path that a packet takes from an instance to the internet. It checks six steps in order, marks each one as passed, failed, or unknown, and links every failed step to the page where you fix it. Use it when an instance can't download updates or can't be reached from the internet.

Before you begin

  • To open the check, any role with Read access to Compute / Instances and to Networking is enough.
  • To fix a step, you need the Owner or Contributor role on the subscription or on the project, or a custom role with Manage access to Networking. Fixes on the instance itself, such as attaching a security group, need Manage access to Compute / Instances.

Open the check

In the console, go to ComputeInstances, and open the instance.

Select the Networking tab. The Internet access check panel is below the summary tiles at the top of the tab.

Read the result line above the steps. The results are described in the table below.

If a step failed, select the link at the end of the first failed step, which the check highlights, and change the setting on the page that opens.

Open the instance's Networking tab again to see the new result.

Result lineMeaning
This server has a path to the internet.Every step passed.
This server cannot reach the internet — see the failed step.At least one step failed.
Some steps could not be checked; the result is incomplete.No step failed, but at least one step couldn't be checked.
The internet access check with six steps: Network interface and Subnet gateway passed, Router failed because the subnet isn't attached to any router, with a link to attach the subnet to a router, and the next two steps unknown.
Console screenshot · illustrative data

What each step checks

StepWhat it checksPasses when
Network interfaceThe instance's network interfaces.The instance has an interface. The step shows its fixed IP address.
Subnet gatewayThe subnet that the interface's address belongs to.The subnet has a gateway. The step shows the subnet.
RouterThe router that has an interface on the subnet.A router is attached to the subnet, its admin state is Up, and its status isn't Down or Error. The step shows the router.
External gatewayThe router's external gateway.The router has one. The step shows the external network.
Public addressA public path for the traffic.A Floating IP is associated with the instance or with this interface, or the router has SNAT on.
Outbound security rulesThe egress rules of the instance's security groups.An attached group has an IPv4 egress rule for any protocol to 0.0.0.0/0. The step shows the group.

A passed step can carry a note about how it passed:

  • A floating IP is associated.
  • No floating IP; outbound traffic uses the router's SNAT address.
  • The interface is on an external network, so no router is needed.

Fix a failed step

StepMessageLinkWhat to do
Network interfaceThe server has no network interface.Open networksAttach an interface to the instance. See Attach a port to an instance.
Subnet gatewayThe subnet has no gateway, so traffic cannot leave it.Open the networkGive the subnet a gateway. See Edit a subnet.
RouterThe subnet is not attached to any router.Attach the subnet to a routerAttach the subnet to a router. See Attach a subnet.
RouterThe router is down or disabled.Open the routerSet the router's admin state to Up. See Rename a router or change its admin state. If the router is in Error, its page shows the reason.
External gatewayThe router has no external gateway.Set the router's external gatewaySelect Set gateway on the router's page. See Set or clear the external gateway.
Public addressNo floating IP and SNAT is off on the router.Allocate a floating IPAllocate a Floating IP and associate it with the instance. See Allocate, associate, and release Floating IPs.
Outbound security rulesNo security group is attached, so all traffic is dropped.Open security groupsAttach a security group to the instance. See Attach a security group to an instance.
Outbound security rulesNo security group allows outbound traffic to the internet.Add an outbound ruleAdd an egress rule for any protocol to 0.0.0.0/0. See Add rules to a group.
Outbound security rulesOutbound traffic to the internet is allowed only for some protocols or ports.Review outbound rulesCheck that the egress rules allow the traffic that the instance needs. The step passes only with an egress rule for any protocol to 0.0.0.0/0.

How the check decides

  • Several interfaces. The instance reaches the internet if any of its interfaces does, so the check shows the interface with the best result.
  • Interface on an external network. The Router, External gateway, and Public address steps pass directly, because the interface needs no router.
  • Steps after a failure. A step that depends on a failed step shows Unknown. For example, without a router, the check can't evaluate the external gateway.
  • Missing data. A step also shows Unknown with Not enough data to check this step. when a list it needs didn't load, or when a referenced resource isn't in the list. The check never guesses these steps.

What the check doesn't cover

The check is worked out in the console from the project's networks, routers, Floating IPs, and security groups. It doesn't send any traffic, and it doesn't look inside the instance. It doesn't take into account:

  • port security that is turned off on a port;
  • the static routes of a router;
  • ingress rules, which decide whether the internet can open connections to the instance. To check them, see View the effective rules of a virtual machine.

On this page