Linux – Resolving External DNS from Azure Virtual Network

azurelinuxnetworkingvirtual-machines

I've set up a virtual network in Windows Azure to host two Linux VMs (Centos / OpenLogic). I've registered a local DNS (local as in the cloud, not my personal network) inside the virtual network. I configured both VMs to use the virtual network and I am able to SSH into the boxes no problem. However, these boxes are not able to resolve external addresses (IP or DNS) and as a result, I am unable to use the package manager to install tools on these boxes. Is there a way that I can configure my virtual network to have an external gateway so that my VMs can access the outside world?

Best Answer

You can setup your local DNS server to forward queries to non-local addresses to external DNS server on the internet. This article provides instructions for how to achieve this on Ubuntu by forwarding unresolved addresses to Google's public DNS servers; you may be able to adapt the instructions for CentOS.