Connecting Azure public services from on-premise - azure

How does network traffic flow from on-premise to the Azure public service if there's a site-to-site VPN-tunnel between Azure and on-premise?
Does the VPN-connection route traffic only to VNET? What if there's a service that does not reside in the VNET? Does the traffic still enter the VPN-tunnel or it goes straight to public network from the on-premise?
Sorry if this is a bit vague question, but I'm trying to understand how the traffic flows from on-prem to Azure Storage/Azure SQL Database/Azure Data Factory/other public services

From what is VPN gateway,
A VPN gateway is a specific type of virtual network gateway that is
used to send encrypted traffic between an Azure virtual network and an
on-premises location over the public Internet.
you will see that VPN-connection route traffic only to VNETs. A Site-to-Site VPN gateway connection is used to connect your on-premises network to an Azure virtual network over an IPsec/IKE (IKEv1 or IKEv2) VPN tunnel.
Generally, without any reverse proxy, traffic flows from on-prem to Azure Storage/Azure SQL Database/Azure Data Factory/other public services that do not reside in the VNET, will be directly routed with a public DNS name or IP address of those services.
Especially, a preview feature Private Link allows you to connect to various PaaS services in Azure via a private endpoint. With Private Link, customers can enable cross-premises access to the private endpoint using ExpressRoute, private peering, or VPN tunneling. Read Using cases of Private Link for Azure SQL Database and Using Private Endpoints for Azure Storage (Preview)
Hope this helps.

Related

Using Azure for VPN

We have a combination of people working from home and people in an office. The office internet has a static IP and the router allows people outside to VPN in. We use the static IP to allow restricted access to our own Azure & AWS resources, but also to clients Azure, AWS and on-site physical hardware.
We are moving to a multi tenancy office that provides a communal internet connection for all tenants.
We'd like to set up some form of VPN in Azure that employees can connect to, authenticated by their O365 accounts (already used to log into their machines), that allows both access to our azure, but also an onward static IP that we can provide to customers who use Azure, AWS or on-site physical hardware.
Note that: You can deploy a VPN gateway in Azure and create a site-to-site VPN with the on-prem VPN router and also another site-to-site connection between Azure and AWS, then configure P2S VPN on the same VPN gateway with AD authentication using Radius server.
I created an Azure virtual network along with gateway subnet and virtual network gateway, gateway type as VPN and VPN type as route-based like below:
You can see public ip, this public IP address will be used to configure on-premise VPN device
Created local network gateway like below:
Created site-to-site VPN connection between virtual network gateway and on-premises VPN device like below.
In Azure portal -> type connection;
In virtual network gateway, under setting -> Add connection like below:
And try to verify the connection in local network gateway like below:
You can view the connection in the virtual network gateway.
Reference:
Tutorial - Configure a BGP-enabled connection between Azure and Amazon Web Services (AWS) using the portal - Azure VPN Gateway | Microsoft Learn
https://learn.microsoft.com/en-us/azure/vpn-gateway/point-to-site-vpn-client-configuration-radius-password

How do I connect an Azure self-hosted Integration Runtime to a Data Factory private endpoint?

I have set up a self-hosted Integration Runtime on an on-premises Windows server and have successfully connected it to a data factory instance using Public endpoint (found in Networking option in the DF). However, when I try to connect it to a DF with a Private endpoint option, I get the error message: "Integration Runtime (self-hosted) Node is not registered". It is definitely not an issue with the authentication key as it works using the Public endpoint for the DF.
Can anybody please point me in the direction of the steps needed to allow the on-premises IR to connect to the private endpoint in DF? I cannot find an adequate detailed description online so any pointers will be appreciated.
Here’s my current setup:
1 vnet, 2 subnets
1 private endpoint to df, 1 private endpoint to storage
1 private DNS link to core windows, 1 private DNS link to data factory
I have NOT created a virtual network gateway as don’t think it’s required
I’m fairly new to Azure and have only basic knowledge of networking principals.
I believe that connecting on-premises Windows server from your Azure virtual network absolutely needs set up an Internet Protocol security (IPsec) VPN (site-to-site) connection or an Azure ExpressRoute (private peering) connection.
Technically, by using Azure Private Link, you can connect to various platforms as a service (PaaS) deployments in Azure via a private endpoint. A private endpoint is a private IP address within a specific virtual network and subnet. This allows us to access the self-hosted Integration Runtime in our Azure VNets by using a private endpoint without a virtual network gateway. Here are detailed steps for the description of this scenario that securing Azure Data Services is using a VNET and Private Endpoints.
However, we need a VPN connection to secure the connection between the on-premise network and Azure VNet because a private IP address cannot be routed through the public Internet.
From official document:
You can also connect an on-premises network to your virtual network by
setting up an Internet Protocol security (IPsec) VPN (site-to-site)
connection or an Azure ExpressRoute (private peering) connection.

How to connect to Microsoft cloud services using ExpressRoute from home network?

I am prototyping mounting a azure blob storge account as NFS drive, part of it i have configured as it specified in the following docs, however i don't have success with site to point vpn solution
https://learn.microsoft.com/en-us/azure/storage/blobs/network-file-system-protocol-support-how-to?tabs=windows
https://learn.microsoft.com/en-us/azure/storage/blobs/network-file-system-protocol-support
i would like to try "An on-premises network that is connected to your primary VNet by using VPN Gateway or an ExpressRoute gateway"
to try this do i need additional configuration on my home router? my ISP assigned with a static IP. What additional networking configurations are needed so that i can connect azure blob storage over NFS via express route?
From supported network connections for NFS3.0, it should work by using a VPN gateway or an ExpressRoute gateway from an on-premise network.
If you are using point to site VPN connection, you could reference from tunneling traffic over a virtual private network or ExpressRoute to configure a private endpoint and enable a service endpoint for your storage account in that VPN VNet, refer here. When you use When you create a private endpoint, ensure that your client could resolve the Azure storage account FQDN to a private IP address, for this, you need to configure DNS on your environment.

Access on-premise server from app service

We have set up a VPN gateway and used it to connect an on-premise network with an Azure VNet. We have successfully tested a number of scenarios
communication from VMs to on-premise DBs
communication from on-premise computers (desktops and servers) to VMs (SSH etc.)
communication from on-premise computers (desktops and servers) to services with Private Link endpoints (App Serivces, DBs etc.).
The use-case we are now attempting is to access an on-premise DB from an app-service. I have integrated the app-service to the routed VNet and also added a service endpoint to this VNet. I have seen infos that this should work but it is not getting though.
A second question is what is the actual source ip of the app-service when it connects to the on-premise server. Surely not the outbound IPs? These are non-exclusive public IPs. Opening these on our VPN firewall would be a risk. In this case is the solution to also give the app service in question a private link endpoint. Will it's source IP then be the private IP of the PL?
Private Endpoint is only used for incoming flows to your Web App. Outgoing flows will not use this Private Endpoint, but you can inject outgoing flows to your network in a different subnet through the VNet integration feature. When you enable Private Endpoint to your Web App, the access restrictions configuration of the Web App is not evaluated. So in this case, I don't think you need to set the service endpoint Microsoft.Web for your web app if you have set it. Reference from using Azure private endpoint for Azure web app.
When regional VNet Integration is enabled, your app makes outbound calls to the internet through the outbound addresses that are listed in the app properties portal. Regional VNet Integration works by mounting virtual interfaces with addresses in the delegated subnet. If WEBSITE_VNET_ROUTE_ALL is set to 1, all outbound traffic can be sent into your VNet. So the source IP address will be from the integrated subnet when app service comes to the on-premise server as the #silent's comment. Reference from how regional VNet Integration works. Please note that the feature supports only one regional VNet Integration per App Service plan.

Is a service Endpoint always the securest way to access a resource on Azure?

I build an architecture, where you can trigger an Azure Function to push data into a Cosmos DB, which lies behind my DMZ. Some implementation guidelines state, that a service endpoint should be always enabled if possible. However, if I do so, the Cosmos DB is potentially exposed to the Internet (although I would not allow any IPs in the Cosmos DB firewall). With exposure I mean the order of handling services in Azure (https://msdnshared.blob.core.windows.net/media/2016/05/1.bmp). Thus, the Cosmos DB would have by default a public endpoint.
Can I restrict any public access from the internet, except blocking all IP addresses?
Can I restrict any public access from the internet, except blocking
all IP addresses?
Actually, By enabling service endpoint, you have limited that only requests originating from that subnet could access the Azure Cosmos DB. Traffic from your VNet to the Azure service always remains on the Microsoft Azure backbone network. So, it's a secure way to access resources in Azure.
After enabling a service endpoint, the source IP addresses of virtual machines in the subnet switch from using public IPv4 addresses to using their private IPv4 address, when communicating with the service from that subnet. Also, the default NSG associated with that subnet continues to work with service endpoints, read here. If you want to deny all outbound internet traffic and only allow access to cosmos DB from that subnet, you could add service tag as the destination in the outbound rules in NSG.
edit
You could have a look at this Azure private link(preview), but it seems it's not available for Azure Cosmos DB Account yet.
Azure Private Link enables you to access Azure PaaS Services (for
example, Azure Storage and SQL Database) and Azure hosted
customer/partner services over a Private Endpoint in your virtual
network. Traffic between your virtual network and the service
traverses over the Microsoft backbone network, eliminating exposure
from the public Internet.

Resources