Cannot access Web API in on-premises VNET using Azure Hybrid Connection - azure

I have created an Azure Web App with Hybrid Connection to access Web API on the on-premises machine. When I access the Web API deployed on my local machine (where Hybrid Connection Manager is installed) and connect to it using Hybrid Connection with server/port as MyMachineName/80, it works perfectly fine.
However, when I try to access the Web API on another server that my local machine is connected to over VNET, it doesn't work. In Hybrid Connection I am giving server/port as VNETMachine/5000.
The error that I am getting is:
An attempt was made to access a socket in a way forbidden by its access permissions xx.xx.xx.xx:5000
I ran netstat -o and found there is no application using this port and from my local machine where Hybrid Connection Manager is installed, I can access the Web API directly by simply typing in the URL in the browser like
http://VNETMachine:5000/api/author.

Related

Two-way Hybrid Connections

I established a Hybrid Connection from App Service to on-premises by using Hybrid Connection Manager (HCM).
Is it possible to connect the other way from on-premises to the App Service?
This would be needed to have a two-way communication channel.
To be clear: I don't need any help regarding the setup of the Hybrid Conenction Manager. Everything is working fine. I also can reach the on-prem resource from App Service by using curl. So is there a way to curl the App Service from on-premises server where HCM is running?

Azure Web app for containers to on-premises connection

Currently i'm hosting an API in an azure Web App for Containers App Service. Additionally, I have a logging database hosted on an on-premises service which can't be accessed publicly.
For accessing the on-premises service it is possible to create a hybrid connection; however this feature is not available through the Azure portal when using Web App for Containers as opposed to when using just a Web App.
Is it possible to create this Hybrid Connection programmatically or through the CLI?
Are there other methods of connecting to on-premises resources through azure?
The API is using ASP.NET Core.
I have been looking into the Microsoft.Azure.Relay package, but I seem to be unable to actually reach my on-premises endpoint through the samples supplied by the package.
Edit:
I have verified that i can make the Hybrid Connection using a Web App. To do this i have downloaded the Hybrid Connection Manager, installed it on the on-premises network and checked that an application can make HTTP calls to the endpoint at the end of the Hybrid Connection.
All of this is done through the azure portal by going into my Web App, then navigating to Networking, configuring Hybrid Connections and creating a Hybrid Connection, and connecting to the new Hybrid Connection through the Hybrid Connection Manager.
What i'm not capable of is doing the same for my Web App for Containers, as Networking is not a supported tap (yet?). Therefore, i'm looking for a programmatical way of doing this either through the CLI or in the sourcecode.

Azure VPN Configuration - Connect to existing VPN

I'm trying to connect my Azure Web App to an Existing VPN.
To connect to this VPN I must give to the admin some configurations, but I'm not sure of HOW can I provide them from Windows Azure.
As far as I have understand is all about creating the Virtual Network and the "connect it".
Like:
Create Virtual Network
Create Public Gateway
Create Local Gateway
Connect something somehow
https://learn.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-howto-site-to-site-resource-manager-portal
In my specific case, for the configuration, are required a lot of parameter that I don't know how / where to find:
VPN Endpoint IP
IKE (Encryption type, Authentication Method, Diffie-Hellman Group, Sec Lifetime, Preshared secret)
IPSEC (Perfect Forward Secrecy)
Network profile
In the docs there is a link to Check Point NGX and Microtik so I check out this tutorial:
https://blogs.technet.microsoft.com/netgeeks/2017/07/11/creating-a-site-to-site-vpn-ipsec-ikev2-with-azure-and-mikrotik-routeros/
But how can I get this parameter to perform the connection? Do I need to install extra software on my WebApp? How can I include my web app in the VPN?
And, is there any simplify way for Web App that does not include creating the whole infrastructure?
Thanks in advance
As EvilSnobu said, you can use Hybrid connections to connect your Azure APP service and your on-premises.
Hybrid Connections can be used to access application resources in other networks.
My understanding is that you have Azure Web App and you need to
connect to an on-premises network via VPN?
You are right, the Hybrid connection feature requires a relay agent in the network that hosts your Hybrid Connection endpoint.
You should download and install Hybrid connection manager (HCM) on your local machine and use it to connect to that app service.

Cannot access on-premise Web API through Azure Hybrid connection

I deployed a web API at port 8090 on an on-prem server. Created a hybrid connection to on-prem server using port 8090. Status is connected. I deployed an Angular application as a Web App to Azure but AJAX request fails with "Name not resolved".
You need to use the fully qualified name of the server your application is hosted on, e.g. http://server.contoso.com/myservice rather than http://server/myservice as you would do locally.

RemoteApp working with Azure Windows Server 2012

Hoping someone can shed some light on my RemoteApp/Azure dilemma
I have successfully setup RDS on Server 2012 VMs in Azure - session host, rdweb and connection broker, opted not to have a gateway as only running one session host.
Created an self-signed certificate in RDS tools in Server Manager and bound this to rdweb, named the cert remote.cloudapp.net. I also uploaded this to the cloud service for the VMs using Azure powershell.
So via an Azure VM on the domain in Azure I can connect to remoteapp and successfully run an application.
However when I connect externally via a browser on my standalone laptop I get the following error in the RDS Log:
Remote Desktop Connection Broker Client failed to redirect the user
REMOTE\appuser. Error: NULL
I have tried the fix of look for an Pool ID of NULL in the Windows Internal Database and I only have one pool ID which is the collection I created, so can't be that.
Also get this error returned when I try to run a remoteapp after successfully logging into the RDweb page:
Remote Desktop Services cannot connect to the remote computer for one
of these reasons: Remote Access is not enabled to the server Remote
computer turned off Remote computer not available on the network
I am totally stumped, is there something I am missing that is so simple.

Resources