No Internet on Azure VM
12/12/2018
2 minutes
I have been using a Virtual Machine on Azure for development purposes for over a year now. I had used this machine several times this week, but from one day to another, "the internet disappeared" on it. Obviously, it was connected to the network, as I was able to log with an RDP session, and even pinging IP-s worked just fine, but no websites were loaded by any browser.
Did some searches on the issue, and found a couple of posts in the topic, but nothing helped.
Symptoms
Pages don't load in the web browers
Cannot connect to OneDrive
My test application could not connect to other Azure resources, like table store
RDP works
Ping works
nslookup fails
I did not change anything explicitly on the machine
I did not change anything explicitly on the Virtual Network, Network Interface or Network Security group resources
First try to fix
Without further investigation of the root cause, I tried the simple fixes, which none worked:
suggestions from other blog posts / stackoverflow / TechNet solutions on similar issues
ipconfig /flushdns
restart of the machine
resize the machine (to try get it on a different server instance)
Soon it turned out that the nslookup is using server 10.0.0.4 which is my local address.
Trying to set the DNS server explicitly in Azure portal for the Virtual Network or the Network interface did not help either.
The FIX
What eventually helped is changing a setting on VM machine:Settings -> Network & Internet -> Network and Sharing Center -> Change adapter settings -> Select the adapter -> Properties, IPv4 properties, and set Obtain DNS address or set the following address instead of 10.0.0.4 use, 168.63.129.16
After this, it is likely that you will need to reconnect to the VM.