Unable to access Blob from Azure Virtual Machines - azure

I am unable to access Blob Service from Azure Virtual Machines running in the same region. I have created a storage account and planned to access to selected IP addresses i.e. MY Laptop, My Office PC and My Virtual Machine which is running is Azure. After whitelisting 3 of the IP's I am able to access the Blob Service from MY Laptop and MY Office PC but unable to access the same of Virtual Machine which is running in Azure.
Pl. let me know if anyone is facing similar issues and the resolution. Thanks in Advance.

Check the NSG the VM belongs to and see if you are allowing the VM to communicate outbound, if so check if Azure storage is allowing incoming connections from the network to which the VM is connected to.

Your VM uses the internal network to attempt to access the Storage so adding the public IP won't work and you can't use internal IP's.
The easiest way would be adding the Virtual Network subnet of the VM to the firewall rules and add Azure.Storage as service endpoint to the subnet. If you add the subnet using the Azure Portal the service endpoint will be automatically added as well. Another way would be setting up a private endpoint.

Related

Azure connecting to a Storage Blob as Private IP instead of Public IP

I am connecting to a client FTP Storage blob via FTP in Azure from a managed Azure VM. I want to force the VM's public IP to be used but it is forcing the Private IP connect, this can be seen from the client logs. What do i need to configure to force the use of the public IP?
Basically the vm from where you are trying to connect to and your
storage account need to be part of same Virtual Network and Subnet.
Check if the firewall is blocking and disable the firewall on the blob
storage .
Also check in your case if both vm and azure storage are in same region:
Services deployed in the same region as the storage account use private Azure IP addresses for communication.i.e; your VM uses the
internal network (over ipv6 and not the VMs published IP addresses
)to attempt to access the Storage so adding the public IP won't work
as IP network rules have no effect on requests originating from the
same Azure region as the storage account
Thus, you cannot restrict access to specific Azure services based on
their public outbound IP address range.Reference: Configure Azure
Storage firewalls and virtual networks | Microsoft Docs.
To allow same-region requests try to use Virtual network rules .
One way to try is by adding the Virtual Network subnet of the VM to
the firewall rules and adding Azure.Storage as service endpoint to
the subnet. If added through Azure Portal the service
endpoint will be automatically added .
Please check the references:
Allowing azure storage connectivity to a public IP - Microsoft Q&A
networking - Cannot to Azure blob storage from VM because of firewall - Stack Overflow

Azure Pipelines agent on Azure VM

I am trying to setup a custom build agent on a Windows VM in Azure. I installed the build agent from Azure Pipelines. The VM shows in the agent pool, but is offline. For this VM I used the default settings, so it automatically created a virtual network, public IP, and network security group. The network security group is modified to allow RDP traffic from my IP address only, and to allow HTTPS traffic. I am assuming something with this setup is preventing Azure Pipelines from sending data to the VM.
My first question is how do I get this setup to work. What am I missing?
My second question is how do I get this to work in a more secure way by removing the default link between the public IP and the VM, and ultimately blocking direct access to the VM with a firewall?
VM only needs outbound HTTPS access to Azure Devops
You dont need public ip for the agent vm
https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/v2-windows?view=azure-devops#im-running-a-firewall-and-my-code-is-in-azure-repos-what-urls-does-the-agent-need-to-communicate-with

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

Connecting Windows Azure to On-Premise Active Directory

I am trying to connect my Windows Azure Virtual machines to my On Premise network. I have established a site to site VPN tunnel, and have created the appropriate subnets and placed a virtual machine in one of the subnets that isn't the gateway subnet.
My on premise test network is 192.168.9.x/24 my Azure Network is 10.4.x.x/16 with a subnet for DMZ - 10.4.2.x/24 and ServerNetwork at 10.4.3.x/24.
I have confirmed that the tunnel is up and running both on the Windows Azure side, as well as on my Cisco ASA 5505.
I want my servers to be able to communicate across the tunnel, however currently they cannot see each other. I am missing something, I tried static routes between the two servers, and have not had any success. Has anyone gotten this to work? If so what did you do on the networking side of the config to make it work?
Thanks,
Steve
Windows Azure Virtual Network enables you to create secure site-to-site connectivity, as well as protected private virtual networks in the cloud.
You can specify the address space that will be used for both your virtual network and the virtual network gateway.
Additionally, new name resolution features allow you to connect directly to role instances and virtual machines by hostname.
These features allow you to use Windows Azure as you would a branch office, or as a protected private virtual network in the cloud.
You can read more about it here:
http://msdn.microsoft.com/en-us/library/windowsazure/jj156007.aspx
Here is a lab exercise to walk you through the process:
http://www.windowsazure.com/en-us/manage/services/networking/create-a-virtual-network/

How to Connect Azure Worker/Web role to Azure Iaas VMs without using public IP's?

We want to run MongoDB and some custom services on Azure Iaas VMs and connect to them with our roles but we do not want to have public IP exposure on the VMs.
If possible what is the best way of doing this?
If not possible is this on the roadmap?
We can add the VM's under the same cloud service and they can communicate happily, the roles are in same deployment so they communicate, but issue between the vm's and roles. We appreciate that the Iaas stuff is still in preview.
Thanks
If you have your Windows Azure Web/Worker Role and Windows Azure Virtual Machine in the same DC you can access them directly using internal IP address using Virtual Networking (Vnet) using internal Endpoints. To achieve it first you would need to create a Virtual Network and then add your Virtual Machine to this VNet. VNet will give your internal IP address and your Web/Worker Role can communicate to this internal IP address.
You can not do mix mode deployment directly from Windows Azure Preview Portal (it is not supported in preview yet) however you can use PowerShell VNet cmdlets to get it configured and working. To need further assistance with VNet team you can contact them directly here.

Resources