Windows Azure VM cannot access microsoft.com - dns

I have 2 VM's on Windows Azure, connected with a virtual network, including the "DNS" component linked to the virtual network.
The first machine is an AD controller (with DNS), and the DNS from the virtual network (in Azure) is pointed to this machine (10.0.0.4).
The 2 vm's can talk to each other, and the second VM is also domain joined with the AD controller on the first machine.
The problem is, on both VM's, I cannot access/browse to anything related to microsoft.com (like visualstudio.com, etc). All other sites (even bing.com) work without any problem.
What could be the reason. Do I need to change some DNS settings on my first VM so that microsoft.com is "excluded" or something. As I suppose that this is "internal" microsoft traffic?
Thanks!

Solved! You need to add the Google DNS to the list of DNS servers in the management portal, and link it to your Virtual Network.
To do so, add one or both of Google's DNS IP addresses (8.8.8.8 or 8.8.4.4) to the list of DNS servers associated with an Azure virtual network. In the Azure management portal, go to 'Virtual Networks > [Your virtual network] > DNS Servers', then add the addresses to the list and click Save.

Related

Virtual network for BizSpark team members

I set up 2 virtual machines on 2 BizSpark accounts (team members). One is for a web application and another for PostgreSQL database. Currently I connect to the Postgres server via public IP address. Is there a way to set up virtual network between the 2 servers on different accounts/subscriptionIds using the new Azure Portal?
Virtual networks do not span subscriptions (regardless of subscription type). You can still set up IP filtering on the input endpoints (or inbound network security rules, for ARM-based deployments) to only allow traffic from your source web application, since traffic is coming from a virtual machine.
Or you can also setup Vnet based Site to Site VPN between the 2 Virtual networks.
Here is some guidance : https://azure.microsoft.com/en-us/documentation/articles/virtual-networks-configure-vnet-to-vnet-connection/
I saw two solutions for that that you can use in your case:
1) PaaS instead of IaaS
2) If VPN is absolutely mandatory, some of BizSpark startups are using OpenVPN for a few subscriptions and it works.

Changing the IP address of Azure Virtual Network cloud service

I have 2 different virtual networks set up in azure. The first of these virtual networks contains virtual machines in which I am able to set the internal virtual network IP as 10.101.1.4, 10.101.1.5, 10.101.1.6 on the virtual machines by using the preview portal to set the IP address
In my other virtual network I have a VPN connection and from the virtual network I add a Cloud service which we have informed the other side of the VPN will be available on 10.103.1.4 but for some reason this has now changed to 10.103.1.5
Is there any means of ensuring that the cloud service will always be deployed to the 10.103.1.4 IP address within the virtual network?
an compute instance or an azureVM get an IP-Adresse via DHCP and the lease time is 100+ years. to set a specific IP-Adresse to an azureVM/compute instance you can define a "static ip reservation" in your own VNET to this instance. e.g. via powershell, the new portal or via your cloud service configuration schema.
check out this link: https://azure.microsoft.com/en-us/blog/reserved-ip-addresses/
regards
patrick

Azure Reserved IP Address Inconsistency

I had a need to add additional public IP addresses to an Azure VM and found a working solution here:
Azure VM: More than one Public IP
Essentially this creates a reserved IP in Azure and then adds the reserved IP to a cloud service. Once it's bound to a cloud service it can be mapped to a VM endpoint.
This all works great but there is one bit I don't understand - The IP address of the reserved IP and the resultant VM endpoint don't match. I have to set up DNS to point to the IP address of the endpoint to make this work. Is there something I am not doing right, or is this just the way reserved VMs work?
It looks like this unanswered question is the same issue:
azure reserved IP for VM is diffrent than the given
Thanks!
The "Azure Cloud Service" is a container that provides internet connectivity to "Azure VMs". Thus, you assign the Internet facing Public IP to the Cloud Service. This article is relatively good at explaining the relationship: Azure Cloud Services
From above link:
Here’s a definition of an Azure IaaS cloud service that will make it easy for you to understand what it is in the context of Azure Infrastructure Services:
A cloud service is a network container where you can place virtual machines.
All virtual machines in that container can communicate with each other directly through Azure (and therefore don’t have to go out to the Internet to communicate with each other).
This container is also assigned a DNS name that is reachable from the Internet.
A rudimentary DNS server is created and can provide name resolution for all virtual machines within the same cloud service container (note that name resolution provided by the DNS server is only available to the virtual machines that are located within the cloud service).
One or more Virtual IP Addresses (VIPs) are assigned to the container and these IP addresses can be used to allow inbound connections from the Internet to the virtual machines.
Certain services (like FTP) may require your vm have a public IP: Azure VM Public IP
(IaaS v1) An Azure cloud service comes with a permanent DNS name - something.cloudapp.net - and has a single VIP allocated whenever there are VMs deployed in it OR whenever a reserved IP address is associated with it. Traffic is either load balanced or NATted (port forwarded) to the VM from the Azure Load Balancer sitting on the VIP. You can also associate a public instance-level IP address (PIP) with a VM, which gives it an additional IP address. The VIP always has a DNS name (something.cloudapp.net) while the PIP has one only if you specifically add it, I did a post which goes into these differences.
(IaaS v2) VMs are not deployed into cloud services and only have a public IP address if one is specifically added - either by configuring a PIP on the NIC of the VM (and optionally giving it a cloudapp.azure.com DNS name) or by configuring a load balancer and either load balancing or NATting traffic to it. This load balancer is configured with a public IP address and can optionally have a cloudapp.azure.com DNS name associated with it. (Ignoring internal load balancers in this discussion.)

Azure Virtual Network Custom DNS Server

I created a virtual network and put 2 VMs in one subnet. But they were not able to ping each other using their hostnames. I need a DNS Server implemented so that hostnames in the subnet can be resolved to IP addresses. How do I do that? Any help will be appreciated. :)
the simplest scenario is to add your hostnames and ips to your localhost file if you are on Windows or you /etc/resolv.conf if you are on Linux. Deploy your VMs with fixed private IPs to avoid changes if they are rebooted or shutdown.
However, if the scenario is more complex with more than two machines, the best way is to deploy a DNS Server inside your VNET. The steps are the following ones:
First you need to add to your virtual network a DNS. You can do it through the management portal in the section NETWORKS > {Your Network Name} > CONFIGURE > dns servers. Fill it with a name and an IP.
Deploy a new VM inside the Virtual Network and set it's IP to the same IP you have defined inside the portal. You can do it through PowerShell (https://azure.microsoft.com/en-us/documentation/articles/virtual-networks-reserved-private-ip/#how-to-add-a-static-internal-ip-to-an-existing-vm)
Configure your DNS server with the records for the VMs and set the forwarders if you want to be able to resolve names outside the virtual network.
You can reboot your virtual machines to get the new configuration through DHCP.
An example: http://www.ytechie.com/2013/06/setting-up-a-dns-server-in-azure-iaasvms/

How do I add a website to a virtual network in Windows Azure?

Scenario:
I have a website on Windows Azure. That website needs to connect to a (new) Azure VM.
I have done the following:
Created new Virtual Network on Azure
Added the VM to the Virtual Network, and it does get an IP in the virtual network.
I have configured the appropiate Endpoint for the VM (Public/Private port).
Now, how do I "connect" the Azure website to the same virtual network, such that my .NET code in the website can create a TCP connection to the VM on it's IP on the Virtual Network ?
This is now possible. Be sure to use the NEW Azure Portal. For details, check out:
http://azure.microsoft.com/blog/2014/09/15/azure-websites-virtual-network-integration/
Currently you cannot connect/add Azure Web Site to a Virtual Network. You can only add VMs and Cloud Services to a Virtual Network. However this is a demanded feature and I believe we will see it in the future releases of the Web Sites service (my speculation).
The key here is to create the Virtual Network before the Virtual Machine and then place the VM in the VN during it's creation. The article here gives instructions moving a VM into a VN.
http://blogs.msdn.com/b/walterm/archive/2013/05/29/moving-a-virtual-machine-from-one-virtual-network-to-another.aspx

Resources