Connecting to windows azure with a VPN - azure

I am running a few machines and we services in Windows azure that I would like to lock off to the rest of the world because of the confidential data that is on there. I have a few small things that make it harder to get at, but I would like to setup a VPN to lock it down. If I set up a VPN service on one of the VM's would I then be able to latch onto the virtual network I have setup there? What is the process in setting this up?

If your cloud service is in a VNET you can create a VPN gateway and connect to it using either a Site-to-Site VPN or a Point-to-Site VPN. The former is IT focused, requiring VPN router configuration - the latter is developer focused, and requires minimal configuration. When using either form of VPN it is possible to take your cloud service completely off the internet for inbound traffic - outbound traffic can go out regardless of what endpoints you define for your VM.

Related

Create a simple VPN in Azure

TLDR;
I got Azure credits, how do I make a simple VPN?
I recently got some Azure credits through a hackathon. How do I create a simple VPN on Azure. It need not be too feature rich, I just wanna use it to access blocked or region specific websites.
I saw on Azure portal that there is virtual machine and virtual network. I don't exactly need a VM, just want to redirect all network traffic through the virtual network.
How do I do this in Azure, Has anyone done anything similar in Azure?
Free VPN are slow and have bugs and paid VPN are expensive & I would like to use my azure credits to create my own VPN.
It sounds like you want to use Azure VPN similar to a consumer VPN like ExpressVPN or NordVPN which protects your client while you surf the Internet. Azure VPN is not designed to be used to surf the Internet. Azure VPN is a service that allows you to create a secure Site-to-Site or Point-to-Site VPN into an Azure Vnet. This allows you to communicate securely with resources in Azure without exposing them with a Public IP.
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 can also use a VPN gateway to send encrypted traffic between Azure virtual networks over the Microsoft network

App service not working with on-premises VPN

I've been trying to set up an App Service which communicates with a server in our on-premises environment. I've set up everything regarding VNET, Local network gateway, Virtual network gateway, Point-to-Site and so on. I've also set up a Linux VM to enable testing, the VM can communicate with on-prem and on-prem reaches our VM.
I also connected the app service to the VNET and it is able to tcpping the VM. But I can't get the app service to communicate with the on-prem service.
In the App Service Plan everything looks normal, I can see all the subnets, site-to-site, point-to-site and that the certificates are in sync.
But when I look at the Networking for the App Service it does not show as connected and Azure says that the certificates are not in sync. Could this be one of the reasons why the App Service and the on-prem can't communicate? Do I have to add routes for the Point-to-Site to the on-prem network?
If the Networking for the App Service is working well it should show as connected and the certificates are in sync. One or more of the possible actions you could try:
Avoid picking IP address space that overlaps with other networks.
When the Site to Site VPN is first set up then the scripts used to configure it should set up routes including your Point-to-Site VPN. If you add the Point-to-Site VPN after you create your Site to Site VPN, then you need to update the routes manually.
If those certificates or network information is changed, then you need to click Sync Network to forcibly sync the certificate to ensure the security of the connection. NOTE: When you click Sync Network then you cause a brief outage in connectivity between your app and your VNet. While your app is not restarted, the loss of connectivity could cause your site to not function properly.
You can get more details from the VNet Integrations.
Update
If your VNet hosted VM can reach your on-premises system but your app can't then the reason is likely one of the following:
your routes are not configured with your point to site IP ranges in your on-premises gateway
your network security groups are blocking access for your Point-to-Site IP range
your on-premises firewalls are blocking traffic from your Point-to-Site IP range
you have a User Defined Route(UDR) in your VNet that prevents your Point-to-Site based traffic from reaching your on-premises network

Q: Azure S2S VNet VPN with failover

I'm trying to setup a VPN connection from a VLAN in Azure to on-premise. We have two different ISP's on-premise and I want to setup Azure with a VPN connecting to both so that if the primary ISP is down Azure will try to connect using the secondary.
The problem is that I can't add two gateways to a single VLAN, and the one gateway will not let me add two VPN connection with the same IP address range. I can understand that if I wanted both to be active, but I want one to be standby and only used if the first disconnects.
Is this even possible? Any pointers would be great?
I have been looking at https://learn.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-highlyavailable#a-name--activeactiveonpremamultiple-on-premises-vpn-devices but that only covers active-active setup which is not what I want.
I want both VNET resouces and on-premise resources to reach each other via the same IP addresses no matter if it's the primary or secondary VPN that's connected.
I know that Azure has fail over on it's side via a standby gateway, but I want fail over when on-premise is down, not Azure.
Update
I know that Azure has fail over on it's side via a standby gateway,
but I want fail over when on-premise is down, not Azure.
Unfortunately, there is not an auto solution for on-premise failover, you could manually perform, which is the same as If the on-premises gateway IP change need to update the same entry. You need to update the local network gateway (Including the On-premises gateway IP and private range ) on the Azure side and the ISP settings where VPN is connected on the on-premise side. Please expect some downtime, because IPSEC session of ISAKMP, PH1 and PH2 Will again take place.
Besides, If you have more than one ISP and need a redundant connection to the Azure. Azure now supports redundant Site to Site VPNs.
Support multiple tunnels between a VNet and an on-premises site with automatic failover based on BGP
You can establish multiple connections between your Azure VNet and
your on-premises VPN devices in the same location. This capability
provides multiple tunnels (paths) between the two networks in an
active-active configuration. If one of the tunnels is disconnected,
the corresponding routes will be withdrawn via BGP and the traffic
automatically shifts to the remaining tunnels.
The following diagram shows a simple example of this highly available setup:
NOTE
BGP is supported on Azure VpnGw1, VpnGw2, VpnGw3, Standard and HighPerformance VPN gateways. Basic SKU is NOT supported.
BGP is supported on Route-Based VPN gateways only.

Azure WebJob on Premise Resource

We have an Azure WebJob running on an App Service connected to a vNET via Point-to-Site connection.
That same vNET is then connected to the on-premise network via a Site-to-Site VPN connection.
Routing is set up so to the Site-to-Site conn so that that the IP range of the Azure vNET (172.27.0.0/24) is sent from OnPrem > Azure. This can be tested by logging in to a VM inside of the vNET to query on premise resources - this works fine, and as expected.
If the same request (to a REST API) is sent from the WebJob, things do not work.
The IP range of the Point-to-Site (172.27.1.144/28) does not intersect with that of the vNET, so i am wondering if we need to also route this range "back across" the Site-to-Site connection also?
Another alternative is that a routing table within Azure needs to have a manual entry, somehow?
Any tips on how to troubleshoot / get this working would be much appreciated.
The IP range of the Point-to-Site (172.27.1.144/28) does not intersect
with that of the vNET, so i am wondering if we need to also route this
range "back across" the Site-to-Site connection also?
You need to do that, indeed. Not only that, you need to configure this network range (172.27.1.144/28) on your on-premises router too - so it recognises and accepts the traffic.
But in order to make the routing from the Point-to-Site (Azure app service) to the on-premise over the Site-to-Site VPN Connection, you will need to use a Virtual Appliance which is capable of forwarding the traffic.
For sake of simplicity and cost savings, you could just use Azure Hybrid Connections to connect Azure Web App / Web Job to on-premise Resource.
You can also refer to the documentation here, which lists the limitations of connecting App Service Plan to a Virtual Network, namely:
There are some things that VNET Integration does not support
including:
mounting a drive
AD integration
NetBios
private site access
Please note the last one - private site access - this is your on-premises.

Azure Multi-Site VPN from One Location

We have a client who wants to connect their premises to Azure. Their main hindrance at this point is determining the best way to connect to Azure given their current connectivity configuration. They have two redundant ISP connections going to the head office for internet access. They want to be able to configure a VPN connection to Azure that would operate in a similar way i.e. if ISP A went down it would seamlessly use ISP B and vice versa. The normal multi-site VPN configuration does not fit this since there is one local network behind which means the network behind separate VPNs over each ISP would have overlapping IP address ranges which is not supported. Is such a configuration possible? (See diagram below)
Either that or is there a way to abstract the two ISP connections onto one VPN connection to Azure.
They’re currently considering using a Cisco ASA device to help with this. I’m not familiar with the features of this device so I cannot verify if it will solve their issue. I know there is also a Cisco ASAv appliance in the Azure marketplace don't know if that could also be a part of a possible solution if they went with such a device.
required vpn configuration
The Site-to-Site VPN capability in Azure does not allow for automatic failover between ISPs.
What you could do are the following
- Have automation task created that would re-create the local network and gateway connection upon failover. Manual and would take some RTO to get it up and running
- Use the Cisco CSRs to create a DMVPN mesh. You should be able to achieve the configuration you want using that option. You would use UDRs in Azure to ensure proper routing
I havent done it in Azure, but here is what you do in AWS (And I am sure there would be parallel in Azure)
Configure a "detached VGW" (virtual Private gateway) in aws. Use DMVPN cloud to connect CSRs to multi-site on-prem.
Also, for failover between ISPs you could have a look at DNS load balancing via a parallel to AWS's Route 53 in Azure.
Reference thread :
https://serverfault.com/questions/872700/vpc-transit-difference-between-detached-vgw-and-direct-ipsec-connection-csr100

Resources