Azure Security Series (1) -Network Security Group (Network Security Group)

 

Azure Security Series (1) -Network Security Group (Network Security Group)

1. What is the NSG?

2. NSG related concepts;

3. Default NSG rules;

4. NSG which applies to products;

5. NSG restrictions;

6. Other considerations (such as port 25);

7. NSG arranged Demo Virtual Machine;

    Virtual machine configuration allows all inbound IP port 80 to allow access to the site http;

    And configure the virtual IP specific inbound inbound ICMP protocol;

    Disable VM 3389 inbound port;

Video explain

You can watch the video at the B station: https://www.bilibili.com/video/av91359930/

Tencent video viewing:

Or watch the video on this site:

 

azure-network-security-group.mp4

 

 

Graphic content:

1. What is the NSG?

Security Group Network Security Group (referred to as NSG) for screening Azure Virtual Network ( Virtual Network ) network traffic in and out of Azure resources.

2. NSG related concepts:

NSG comprises security rules, security rules to allow or deny the Statute inbound / outbound traffic.

Safety rules configurable items include:

Attributes Explanation
name The only name of the network security group.
priority A number between 100 and 4096. Rules are processed in order of priority. First deal with a small number of rules, because the smaller the number, the higher the priority. Once the traffic matches a rule, the process will stop. Therefore, no lower-priority processing (higher numbered), which is a high-priority attribute the same rules all rules.
The source or destination

Can be any value, it may be a single IP address, Classless Interdomain Routing (CIDR) block (e.g. 10.0.0.0/24), service mark , or application security group .

服务标记代表给定 Azure 服务中的一组 IP 地址前缀。参见 https://docs.azure.cn/zh-cn/virtual-network/service-tags-overview

使用应用程序安全组可将网络安全性配置为应用程序结构的固有扩展,从而可以基于这些组将虚拟机分组以及定义网络安全策。

协议 TCP、UDP、ICMP 或 Any。
方向 该规则是应用到入站还是出站流量。
端口范围 可以指定单个端口或端口范围。 例如,可以指定 80 或 10000-10005。
操作 允许或拒绝

 

3. 默认的安全组规则:

入站

AllowVNetInBound

优先级 Source 源端口 目标 目标端口 协议 访问
65000 VirtualNetwork 0-65535 VirtualNetwork 0-65535 任意 允许

AllowAzureLoadBalancerInBound

优先级 Source 源端口 目标 目标端口 协议 访问
65001 AzureLoadBalancer 0-65535 0.0.0.0/0 0-65535 任意 允许

DenyAllInbound

优先级 Source 源端口 目标 目标端口 协议 访问
65500 0.0.0.0/0 0-65535 0.0.0.0/0 0-65535 任意 拒绝

出站

AllowVnetOutBound

优先级 Source 源端口 目标 目标端口 协议 访问
65000 VirtualNetwork 0-65535 VirtualNetwork 0-65535 任意 允许

AllowInternetOutBound

优先级 Source 源端口 目标 目标端口 协议 访问
65001 0.0.0.0/0 0-65535 Internet 0-65535 任意 允许

DenyAllOutBound

优先级 Source 源端口 目标 目标端口 协议 访问
65500 0.0.0.0/0 0-65535 0.0.0.0/0 0-65535 任意 拒绝

4. NSG 试用于哪些产品?

Category 服务
计算 虚拟机:Linux 或 Windows
虚拟机规模集
云服务:仅限虚拟网络(经典)
Azure Batch
网络 应用程序网关 - WAF
VPN 网关
Azure 防火墙
网络虚拟设备
数据 RedisCache
Azure SQL 数据库托管实例
分析 Azure HDInsight
容器 Azure Kubernetes 服务 (AKS)
Web API 管理
应用服务环境

5. NSG限制

受限于Azure 订阅限制

网络安全组 5,000
每个 NSG 的 NSG 规则数 1,000

6. 其他注意事项

  • 主机节点的虚拟 IP:基本的基础结构服务(例如 DHCP、DNS、IMDS和运行状况监视)是通过虚拟化主机 IP 地址 168.63.129.16 和 169.254.169.254 提供的。 这些 IP 地址属于 Azure,是仅有的用于所有区域的虚拟化 IP 地址,没有其他用途。
  • 许可(密钥管理服务) :在虚拟机中运行的 Windows 映像必须获得许可。 为了确保许可,会向处理此类查询的密钥管理服务主机服务器发送请求。 该请求是通过端口 1688 以出站方式提出的。 对于使用默认路由 0.0.0.0/0 配置的部署,此平台规则会被禁用。
  • 负载均衡池中的虚拟机:应用的源端口和地址范围来自源计算机,而不是来自负载均衡器。 目标端口和地址范围是目标计算机的,而不是负载均衡器的。
  • Azure 服务实例:在虚拟网络子网中部署了多个 Azure 服务的实例,例如 HDInsight、应用程序服务环境和虚拟机规模集。  在将网络安全组应用到部署了资源的子网之前,请确保熟悉每个服务的端口要求。 如果拒绝服务所需的端口,服务将无法正常工作。
  • 发送出站电子邮件:Azure 建议利用经过身份验证的 SMTP 中继服务(通常通过 TCP 端口 587 进行连接,但也经常使用其他端口)从 Azure 虚拟机发送电子邮件。在 Azure 中使用 SMTP 中继服务绝不会受限制,不管订阅类型如何。如果是在 2017 年 11 月 15 日之前创建的 Azure 订阅,则除了能够使用 SMTP 中继服务,还可以直接通过 TCP 端口 25 发送电子邮件。如果是在 2017 年 11 月 15 日之后创建的订阅,则可能无法直接通过端口 25 发送电子邮件。经端口 25 的出站通信行为取决于订阅类型,如下所示:
    • 企业协议:允许端口 25 的出站通信。 可以将出站电子邮件直接从虚拟机发送到外部电子邮件提供商,不受 Azure 平台的限制。
    • 标准预付费套餐:默认阻断,需提工单解除,
发布了44 篇原创文章 · 获赞 4 · 访问量 1697

Guess you like

Origin blog.csdn.net/yushuzhen2008/article/details/104485050
Recommended