【Azure 应用服务】App Service 默认开放端口说明, 如何禁用Web app的端口号?
问题描述
基于安全的角度来考虑,在网站上线之前用户会对自己的网站进行安全扫描,以防网站因为某些漏洞而被非法攻击。 而在扫描过程中,会发现除了 80 和 443 之外的一些其他端口也被开放了。例如:454, 455, 4020, 4022, 4024 等端口也处于开放状态。 如何禁用Web app的端口号?
问题解答
基于目前 App Service 架构的特殊性(PaaS, 底层维护有平台掌控),所以并不能从App Service服务的使用层面来关闭这些端口,也无法针对端口的任何的调整。开放的端口都是平台必须端口,每一个端口具体的使用说明如下:
-
454:必需端口,Azure 架构使用此端口来管理和维护服务。
-
455:必需端口,Azure 架构使用此端口来管理和维护服务。
-
80:HTTP 访问时的默认入站端口。
-
443:SSL 访问时的默认入站端口。
-
21:FTP 的控制通道端口。
-
10001~10020:FTP 的数据传输端口。
-
4020:为 Visual Studio 2015 远程调试的预留端口。
-
4022:为 Visual Studio 2017 远程调试的预留端口。
-
4024:为 Visual Studio 2019 远程调试的预留端口。
参考资料
App Service 默认开放端口说明:https://docs.azure.cn/zh-cn/articles/azure-operations-guide/app-service/aog-app-service-description-of-default-open-port
- 21: Control channel for FTP.
- 80: Default port for inbound HTTP traffic to apps running in App Service Plans in an App Service.
- 443: Default port for inbound SSL traffic to apps running in App Service Plans in an App Service.
- 454: Required port used by Azure infrastructure for managing and maintaining App Service via SSL.
- 455: Required port used by Azure infrastructure for managing and maintaining App Service via SSL.
- 990: Control channel for FTPS.
- 4016: Used for remote debugging with Visual Studio 2012.
- 4018: Used for remote debugging with Visual Studio 2013.
- 4020: Used for remote debugging with Visual Studio 2015.
- 4022: Used for remote debugging with Visual Studio 2017.
- 4024: Used for remote debugging with Visual Studio 2019.
- 7654: Metadata endpoint used by the internal service (does not take any input, only returns an IP address).
- 8172: Port used for WebDeploy service (protocol used by Visual Studio for publishing sites)
- 10001-10300: Data channels for FTP or FTPS (Passive Port Range)
当在复杂的环境中面临问题,格物之道需:浊而静之徐清,安以动之徐生。 云中,恰是如此!
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?