Hello @PETER ,
From your description, I believe there is a UDR applied to the subnet of Azure Virtual machine from where you are trying to access Internet.
UDR or User Defined Routes are routes created in Azure to override Azure's default system routes, or to add additional routes to a subnet's route table.
Please refer : https://video2.skills-academy.com/en-us/azure/virtual-network/virtual-networks-udr-overview#user-defined
The UDR in your case could be a default route or 0.0.0.0/0 address prefix route with next hop as the DNS server which is forwarding all traffic including Internet traffic to the DNS server.
So the best option for you would be to dis-associate the UDR from your Virtual machine subnet by following the below article:
https://video2.skills-academy.com/en-us/azure/virtual-network/manage-route-table
To do tasks on route tables and routes, your account must be assigned to the Network contributor role or to a Custom role that's assigned the appropriate actions listed here.
In order perform all virtual machine actions including create, update, delete, start, restart, and power off virtual machines, you need to have the Virtual Machine Contributor roles.
It would be easier for you to check all the resources via Azure portal, if you have access to it.
Kindly let us know if the above helps or you need further assistance on this issue.
----------------------------------------------------------------------------------------------------------------
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.