Azure Vm no Internet access

Adaptive Information Systems 0 Reputation points
2026-07-23T17:01:41.61+00:00

Azure Vm no internet access. I have changed the dns to point to the google.com and doesn't work and I did a ipconfig/flushdns.

Azure Virtual Machines
Azure Virtual Machines

An Azure service that is used to provision Windows and Linux virtual machines.


1 answer

Sort by: Most helpful
  1. Divyesh Govaerdhanan 11,725 Reputation points MVP Volunteer Moderator
    2026-07-23T17:28:04.4466667+00:00

    Hi Adaptive Information Systems,

    Thanks for reaching out on Microsoft Q&A.

    Two things stand out here, and the DNS change you made is likely not the root cause.

    1. Your VM probably has no outbound connectivity at all

    If this VM was created recently, note that Azure retired default outbound access. New subnets created through the portal are now private by default, meaning the VM cannot reach the internet unless you explicitly enable outbound traffic. Flushing DNS will not help if there is no outbound path.

    To confirm, run this from the VM:

    Test-NetConnection 8.8.8.8 -Port 443
    

    If this fails, it is a connectivity issue, not DNS. Fix it by adding one of these:

    • NAT Gateway on the VM's subnet (recommended)
    • A Standard Public IP attached to the VM's NIC
    • A Standard Load Balancer with outbound rules

    Alternatively, go to your VNet > Subnets > select the subnet > set Default outbound access to Enabled, then stop/deallocate the VM, and restart it. Keep in mind this option goes away for new VNets with the API change after March 31, 2026, so NAT Gateway is the better long term fix.

    2. Your DNS setting is invalid

    DNS servers must be IP addresses, not hostnames. "google.com" will not work as a DNS server. Use 8.8.8.8 (Google) or leave it as the Azure default 168.63.129.16. Also, set DNS at the VNet or NIC level in the Azure portal rather than inside the guest OS, since DHCP can overwrite in-guest changes.

    Also check:

    • NSG on the NIC/subnet for any outbound Deny rules
    • Effective routes on the NIC (Networking > Effective routes) for a UDR sending 0.0.0.0/0 to a firewall or appliance that may be blocking traffic

    Reference: Default outbound access in Azure

    Please Upvote and accept the answer if it helps!!

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.