简体   繁体   English

如何将azure api应用程序部署到专用网络

[英]how to deploy a azure api app to private network

I would like to use some of the benefits of hosting a web api in Azure, but I want that api to be private (not accessible from the outsite world) as it only be used internally. 我想利用在Azure中托管Web api的一些好处,但是我希望该api是私有的(不能从异地世界访问),因为它只能在内部使用。

I am not sure if that is even possible. 我不确定这是否可能。 I've tried deploying from visual studio but the api is hosted on xyz.azurewebsites.net and is accessible from everywhere. 我曾尝试从Visual Studio进行部署,但该API托管在xyz.azurewebsites.net上,并且可以从任何地方访问。

Thanks in advance. 提前致谢。

You could restrict access to the site to a specific ip address or range of addresses through the web.config. 您可以通过web.config将对站点的访问限制为特定的IP地址或地址范围。 Add a section to system.webServer : system.webServer添加一个部分:

<system.webServer>
    <security>
        <ipSecurity allowUnlisted="false" denyAction="NotFound">
            <add allowed="true" ipAddress="123.456.0.0" subnetMask="255.255.0.0"/>
        </ipSecurity>
    </security>
</system.webServer>

More info here: IP and Domain Restrictions for Windows Azure Web Sites 此处的更多信息: Windows Azure网站的IP和域限制

In addition to levelnis's suggestion about static ip security restricting access, there is the option of using an App Service Environment. 除了levelnis关于静态IP安全性限制访问的建议之外,还可以选择使用App Service环境。

https://docs.microsoft.com/en-us/azure/app-service-web/app-service-app-service-environment-intro https://docs.microsoft.com/en-us/azure/app-service-web/app-service-app-service-environment-intro

App Service Environments are ideal for application workloads requiring: 应用程序服务环境非常适合需要以下条件的应用程序工作负载:

  • Very high scale 规模极高
  • Isolation and secure network access 隔离和安全的网络访问

An ASE is always placed in a virtual network's subnet, so you can use NSGs to control access. ASE始终放置在虚拟网络的子网中,因此您可以使用NSG来控制访问。 ASEs are a Premium service though so can be quite expensive. ASE是一项高级服务,因此可能会非常昂贵。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 部署到具有专用端点的 Azure Web 应用程序 - Deploy to an Azure Web App with a private endpoint 如何在同一个 ZCF04A02E37B774FC3191A48F605C3 应用程序中部署 angular 应用程序和 web API 应用程序? - How to deploy angular app and web API in same azure app service? 我们可以将 Azure SQL 数据库部署到专用虚拟网络吗?为什么? - Can we deploy Azure SQL Database to a private virtual network and why? 如何使用msbuild部署Azure Api App - How can I deploy Azure Api App using msbuild 如何使用“创建容器组”操作将私有Docker集线器映像部署到Azure Logic应用 - How to deploy a private docker hub image to an Azure Logic App using the 'Create container group' action 如何部署使用来自私有 GitHub 存储库的代码的 Azure function 应用程序 - How to deploy Azure function app that uses code from a private GitHub repository 如何通过私有DNS名称从虚拟网络中的App Service访问Azure VM? - How to access Azure VM from App Service in virtual network by private DNS name? 通过Git使用私有凭据部署Azure Web应用 - Deploy Azure web app with private credentials via Git 通过 Azure DevOps 使用专用端点部署应用服务 - Deploy App Service with private endpoint via Azure DevOps 无法将私有 github 注册表中的 docker 图像部署到 Azure 应用服务 - Cannot deploy docker image in private github registry to Azure App Service
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM