从明确的防火墙访问Azure MySQL柔性服务器

huangapple go评论63阅读模式
英文:

Access to Azure MySQL Flexible Server from a definite firewall

问题

我在Azure上创建了一个MySQL Flexible Server实例。我需要关闭公共网络访问,只允许通过一个明确的防火墙访问。

防火墙有一个明确的公共IP,我可以在MySQL网络部分指定它,这不是问题。问题在于我可以从任何地方连接到数据库,我事先不知道所有可能的源IP。

我需要将所有流量路由通过防火墙,这样从Azure的角度来看,它将来自一个单一的IP。MySQL服务器有一个类似于<name>.mysql.database.azure.com的FQDN。

不幸的是,我不能在我的防火墙中指定FQDN,只能指定IP,而IP可能会更改。对于经典的MySQL单一服务器,我会配置防火墙规则以允许流量传向服务/区域对应的“Azure Service Tags”文件中列出的所有IP,比如Sql.WestEurope

但在Flexible中,似乎无法使用这种方法,因为从其FQDN解析出的IP在服务标签中找不到。

我该怎么办?

英文:

I created an instance of MySQL Flexible Server on Azure. I need to close public network access and allow it only through a definite firewall.

The firewall has a definite public IP and I can specify it in the MySQL networking section, that's not a problem. The problem comes because I could connect to the DB from anywhere, and I don't know all possible source IPs in advance.

I need to route all traffic through the firewall, so that it'll be coming from a single IP, from Azure point of view. The MySQL server has an FQDN like &lt;name&gt;.mysql.database.azure.com.

Unfortunately, I can't specify FQDN in my firewall, only IPs, and IP might change. With a classic MySQL Single Server I would configure the fw rules to allow traffic towards all IPs listed in "Azure Service Tags" file for the service/region pair, say Sql.WestEurope.

This does not seem to work with Flexible because the resolved IP from its FQDN can't be found among service tags.

How could I do ?

答案1

得分: 1

是的,这个功能已经从单一服务器更改为灵活的方式,不再支持服务标签。

尝试使用VNet集成进行私有访问,以限制对你的Azure MySQL灵活服务器的访问仅限于特定的虚拟网络或子网。你可以选择在部署时创建新的私有DNS区域,或者使用现有的私有DNS区域。如果你的防火墙不支持FQDN,你可以设置你的防火墙目标IP。

英文:

Yes, this feature was changed from single server to flexible, no service tag is supported now.

Try using private access with VNet integration to restrict access to your Azure MySQL Flexible Server to a specific virtual network or subnet.
You can choose to create a new private DNS zone while deploying with private access or use an existing one. You can setup your firewall destination IP if it does not support FQDN.

huangapple
  • 本文由 发表于 2023年6月6日 00:10:14
  • 转载请务必保留本文链接:https://go.coder-hub.com/76408234.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定