简体   繁体   English

添加 NSG 规则以在 Azure PostgreSQL 灵活服务器上启用高可用性

[英]Adding NSG rules to enable high availability on Azure PostgreSQL Flexible Server

I am trying to enable ZoneRedundant High Availability on our Azure PostgreSQL Flexible server.我正在尝试在我们的 Azure PostgreSQL 灵活服务器上启用 ZoneRedundant 高可用性。

The Azure documentation mentions the following important step: Azure 文档提到了以下重要步骤:

High availability Features of Azure Database for PostgreSQL - Flexible Server require ability to send\receive traffic to destination ports 5432, 6432 within Azure virtual network subnet where Azure Database for PostgreSQL - Flexible Server is deployed, as well as to Azure storage for log archival. High availability Features of Azure Database for PostgreSQL - Flexible Server require ability to send\receive traffic to destination ports 5432, 6432 within Azure virtual network subnet where Azure Database for PostgreSQL - Flexible Server is deployed, as well as to Azure storage for log archival. If you create Network Security Groups (NSG) to deny traffic flow to or from your Azure Database for PostgreSQL - Flexible Server within the subnet where its deployed, please make sure to allow traffic to destination ports 5432 and 6432 within the subnet, and also to Azure storage by using service tag Azure Storage as a destination.如果您创建网络安全组 (NSG) 以拒绝流量流入或流出您的 Azure 数据库的 PostgreSQL - 部署其的子网内的灵活服务器,请确保允许流量流向子网内的目标端口 5432 和 6432,以及Azure 存储,使用服务标签 Azure 存储作为目标。

I'm finding it hard to get my head around this from the way it is written and can't find many details about it elsewhere.我发现很难从它的编写方式中理解这一点,并且在其他地方找不到关于它的许多细节。

From what I understand, the first requirement is to add an inbound NSG rule as follows:据我了解,第一个要求是添加入站 NSG 规则,如下所示:

Source IP: [CIDR of the database subnet]
Source Port Range: *
Destination IP addresses: [CIDR of the database subnet]
Destination Port Ranges: 5432,6432
Action: Allow
Priority: [Any number before the default inbound DENY rules]

Have I read this correctly?我读对了吗? We are effectively allowing traffic between the instance and the replication instance within the subnet, so the source IP and the destination IP should both be the database subnet CIDR.我们有效地允许子网内的实例和复制实例之间的流量,因此源 IP 和目标 IP 都应该是数据库子网 CIDR。

I know that NSGs are stateful.我知道 NSG 是有状态的。 So am I right in saying I don't need any Outbound rule for this case?所以我说我在这种情况下不需要任何出站规则是对的吗?

The second requirement to allow traffic 'to Azure storage by using service tag Azure storage as a destination' is confusing me.允许流量“通过使用服务标签 Azure 存储作为目标”的第二个要求让我感到困惑。 From the way this is written I don't know if it should be an inbound or an outbound rule.从这种写法来看,我不知道它应该是入站规则还是出站规则。 My first guess was outbound as logs would be moving FROM the database to Azure storage.我的第一个猜测是出站,因为日志将从数据库移动到 Azure 存储。 Is that correct?那是对的吗?

• As per the statement from the Microsoft documentation, it is imminent that all the resources dealing with or related to the Azure PostgreSQL Database – Flexible Server should be deployed within the same virtual network . • 根据 Microsoft 文档中的声明,所有与 Azure PostgreSQL 数据库相关或相关的资源都应该部署在同一个虚拟网络中。 The statement accordingly states that for Azure PostgreSQL Database – Flexible server, the incoming as well as outgoing traffic over the ports 5432 and 6432 should be allowed within the same subnet .该声明相应地指出,对于 Azure PostgreSQL 数据库 – 灵活服务器,应允许在同一子网内通过端口 5432 和 6432 的传入和传出流量

It is because the PostgreSQL Database Server listens to the localhost IP, ie, '127.0.0.1' through these ports only, ie, 5432 and 6432. Also, since these ports are by default not open and thus, are secure in these scenarios, the related Microsoft documentation text states accordingly . It is because the PostgreSQL Database Server listens to the localhost IP, ie, '127.0.0.1' through these ports only, ie, 5432 and 6432. Also, since these ports are by default not open and thus, are secure in these scenarios, the related Microsoft documentation text states accordingly

Thus, based on that, the NSG rule that you have created is clearly sufficient and correct to allow the traffic on these ports for the PostgreSQL database server .因此,基于此,您创建的 NSG 规则显然足以和正确地允许 PostgreSQL 数据库服务器的这些端口上的流量 And yes, the traffic rule needs to be created to the Azure storage from the Azure PostgreSQL database subnet and from the trusted network ranges/subnets to the Azure storage with the destination as Azure Storage as a service tag if only logs are to be transferred to that storage account . And yes, the traffic rule needs to be created to the Azure storage from the Azure PostgreSQL database subnet and from the trusted network ranges/subnets to the Azure storage with the destination as Azure Storage as a service tag if only logs are to be transferred to that storage account If it is provisioned for some other purpose other than this, then you will have to create rules accordingly.如果它是为其他目的而提供的,那么您将必须相应地创建规则。

Ensure to create an outbound NSG rule for the Azure storage account which will suffice the requirement from the Azure PostgreSQL DB Server subnet .确保为 Azure 存储帐户创建出站 NSG 规则,这将满足 Azure PostgreSQL 数据库服务器子网的要求

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

相关问题 通过Azure ARM模板将VNET规则添加到PostgreSQL服务器 - Adding VNET Rules to PostgreSQL Server via Azure ARM Template 使用 Bicep 更改 Azure PostgreSQL 灵活的服务器配置 - Changing Azure PostgreSQL flexible server configuration with Bicep Azure PostgreSQL 灵活服务器的数据库 Django 慢 - Azure Database for PostgreSQL flexible server Slow with Django postgresql 9.4高可用性拓扑 - postgresql 9.4 high availability topology PostgreSQL在Openshift齿轮上的高可用性 - PostgreSQL high availability on Openshift gear 使用 .NET 核心 6 和 Azure SDK 创建 PostgreSQL 灵活服务器时出错 - Error on creation of a PostgreSQL flexible server with .NET core 6, and Azure SDK 是否可以拥有 azure 灵活 postgresql 服务器的只读副本和数据子集? - Is it possible to have a read replicas of azure flexible postgresql server with a subset of data? Azure 用于 PostgreSQL 灵活服务器部署的数据库因 databaseName 参数错误而失败 - Azure Database for PostgreSQL flexible server deployment fails with databaseName param error Azure PostgreSQL 灵活服务器 Cron 作业权限被拒绝 - Azure PostgreSQL Flexible Server Cron Job Permission Denied Azure 自动化中的 PostgreSQL 规则 - PostgreSQL rules in Azure automation
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM