Azure Front Door unable to connect with wss/websync (websocket secure) - azure

I've deployed .net application on Azure App service which works perfectly fine including webSync connections when I access it through custom domain or app service default domain, but only WebSync doesn't work when I enable the Azure Front Door and points my domain to go through Front Door to the backend app service.
My WebSync is running from a Azure VM and all the required ports are allowed, app service and VM are sharing the same VNET.
I am using Azure Front Door's "Standard" version, Do I need to switch to the premium version and connect with my app service through private link? but again my WebSync is running from a VM so it's not clear to me that why Azure Front Door is unable to connect with WebSync and all the other things are working fine.
I get following error (pic attached)

Azure Front Door only supports HTTP, HTTPS and HTTP/2.
https://learn.microsoft.com/en-us/azure/frontdoor/front-door-faq#what-protocols-does-azure-front-door-support-

Related

Do i need point to site vpn with azure waf and web app

I have been messing around with Azure trying to get a web app up and running. My plan was to create a WAF and site the web app behind that, each in a seperate subnet and then to use the service endpoint tech to point the web app to a database.
I have been stopped in my tracks almost straight away with the revelation that if i want to use a WAF in front of the web app i have to configure the networking in the web app but when i choose a vnet it says that no gateway is configured for the selected VNET.
My question being is do i have to use point to site VPN to get this setup working? i thought that it would work like
INTERNET ---> VNET ----> subnet ----> WAF -----> subnet -----> web app ----> service endpoint ------> DB
but that doesnt seem to be the case. I am not keen on the idea of having to install a client certificate on every machine in our network that might want to access this website (it is currently internal). I suppose i am looking for the best of both worlds. Accessible from the internet but having the added comfort of having something like a WAF sat in front of it to make up for any security inadequacies which might exist somewhere in said app.
Thanks
As far as I know, you could not deploy a web app in a VNet unless you are using the App Service Environment(Isolated). App VNet integration could not do it. It allows you to securely access resources in a VNet. For example, you have a database on an Azure VM in a private VNet. You could not access it from Azure web app to this database if this database is not available publicly, but you could reach it via app VNet integration.
VNet service endpoints is another different service. Endpoints allow you to secure your critical Azure service resources to only your virtual networks. If you enable such service endpoint like Azure SQL database( which differs from the database on Azure VMs) in a VNet, this means only the resource in these authorized VNets could access your SQL database unless you add an exclusion like the public IP address in the firewall of the database.
In this case, you could put a Public facing Azure app gateway at the high level of the web app service, then add the Azure app gateway public IP in the IP restriction of the web app.This will restrict to access to web app via Azure web app gateway over the Internet. Also, you could control the network inbound and outbound in Azure app gateway subnet NSG. See Network security groups on the Application Gateway subnet if you want to add an NSG to the app gateway subnet level. I think these are enough if you just want to create a WAF and site the web app behind that.
Furthermore, if you want to let web app privately access the Azure SQL database. You could deploy a web app in an ASE, then enable the VNet service endpoint for Azure SQL database. App VNet integration does not need to use it with the service endpoint.
If you want to use Azure WAF with Azure App Service (multi-tenant) you can, you just need to ensure you are supplying the host header with your request.
If you want you Azure Web App on a VNet, you will need to run your Azure Web App on an App Service Environment (Isolated). This version of Azure Web App is more expensive but allows you to apply NSG's to the VNet to fully control access to your web app. Personally I think WAF w/ Azure App Service (multi-tenant) should meet your needs.
We have it all documented here:
https://learn.microsoft.com/en-us/azure/application-gateway/application-gateway-web-app-overview
https://learn.microsoft.com/en-us/azure/application-gateway/configure-web-app-portal

Is traffic from Azure Application Gateway to Azure Web App (App Service) backend pools over the Azure backbone network?

I have configured an Application Gateway in front of multiple Azure Web App backend pools as per this article.
In addition to providing a WAF, I use the Application Gateway to offload the SSL connection to the backend pools. I have configured the backend pools to use the FQDN of the App Service instances as they're not currently deployed into a VNET.
Based on the following scenario:
Request to custom.com:443 ---> Application Gateway ---> custom.azurewebsites.net:80
My concern is that the connection from the Application Gateway to the Web App is unencrypted over port 80 and I haven't found anywhere that describes this connectivity as happening over the Azure backbone network. Is there any risk that this traffic could be sniffed and compromised?
Spoke to Microsoft support who said the traffic from my Application Gateway to my Web App will stay on the Microsoft backbone.
He also pointed me to the following knowledge article; which states:
If the destination address is for one of Azure's services, Azure routes the traffic directly to the service over Azure's backbone network, rather than routing the traffic to the Internet. Traffic between Azure services does not traverse the Internet, regardless of which Azure region the virtual network exists in, or which Azure region an instance of the Azure service is deployed in.

Accessing service on a Virtual Machine from azure app service

We have got VMs on Azure and services are running in there.
We are trying to deploy our MVC Web application to Azure App service, which accesses some of the services from the VM using the private IPs but it can't connect to the service hosted on the VM using the private IP. We were assuming that all of our resources will be in the same network, can anyone help with this?
Thanks
Azure App service are having two kinds of hostings
Single Tenant (App Service Environment) which is dedicated to the customer
Multi tenant ( shareable across other customer subscription inside a data center scale unit)
If your application is hosted as multi tenant application meaning app service URL {WEbAppName}.Azurewebsites.net then its internet facing application and if it needs to connect to any VNET (Virtual Network) hosted service then it needs to integrate to any or same VNET.
How to do App service VNET Integration:
https://learn.microsoft.com/en-us/azure/app-service/overview-vnet-integration#regional-virtual-network-integration
Once the App service integrated with VNET then ideally it has connectivity with all the services present inside the same VNET or with peered VNET.
How to confirm connectivity from App Service to VNET hosted resource.
Go to App Services application => Advanced tools or console => perform below commands sequence wise as the HTTP communication happens through this sequence:
nslookup {Destination_FQDN} {Optional-DNSServer}/nameresolver {Destination_FQDN} {Optional-DNSServer}
tcpping {Destination FQDN}
curl -v {DestinationFQDN}
Common Scenarios:
If you're receiving connection refused it means its NSG is not allowing the communication.
If you're getting request time out it means it could be due to firewall or no proper routes to reach to destination.
If its connection abort it means its intermediate device is not passing connection through.
Troubleshoot connectivity issues using Azure Network Watcher: https://learn.microsoft.com/en-us/azure/network-watcher/network-watcher-connectivity-portal

Access Azure App Service RESTful endpoints from On Premise resources using VPN

I have an on premise desktop application and I need it to hit Web APIs I have living in an App Service Web App (on an App Service Plan) in Azure.
My on premise resources are connected over a site to site VPN and I was wondering if there is a way I can call these Web API services(in an app service) directly over the VPN instead of going to the public endpoint.
The "normal" App Service Plan exists in a multi-tenant environment so this is not possible. You would need to use an ASE (App Service Environemnt) to use advanced networking features like VPN and NSG.

Hosting web api as webapp in azure along with VM in same data center

I have a VM running SQL Server in Azure East US2. I also hosted a webapi as azure web app. Connection string used in webapi is being routed through internet gateway right now. I want to ensure that both of these services are hosted on same data center so that they communicate over LAN instead of internet gateway.
I was trying to setup a VNET and when I tried adding this VNET to webapi, it asks to setup VPN gateway. Why do I need to setup VPN gateway, are they not aware of being on same data center. Can't they be put on LAN without setting up VPN.
When you deploy both your VM and your Web App in Azure East US2 they land on the same geo-region. Please note that a lot of Azure Regions do have more than one facility (the thing you call Data Center), and you have no control over where exactly within a region (i.e. East US2) your resource will be deployed.
Now, if you want to talk to your SQL Server on an Azure VM from the Web App, you have to use VNet integraton. Because you are not deploying into a App Service Environment, you have to connect your web app to the VNet where your SQL Server is. The way to do this is by implicitly utilising a Point-to-Site VPN Connection between your web app and your VNet.
Do not worry, the whole process is automated and you do not have to deal with certificates and certificate roll-over, but there is a need for VPN Gateway. That's way you are being asked for the VPN Gateway.
But you should really consider using Azure SQL DB instead an SQL Server on VM.

Resources