Postgresql PowerBI服务器列表
我在Postgresql数据库中有一个事实表,我知道如何使用PowerBI professional构建PowerBI分析。 如果我让Postgresql接受来自所有internet IP地址的连接,它可以工作,但不安全。我想限制对Power BI服务器的访问。Postgresql PowerBI服务器列表,postgresql,powerbi,firewall,Postgresql,Powerbi,Firewall,我在Postgresql数据库中有一个事实表,我知道如何使用PowerBI professional构建PowerBI分析。 如果我让Postgresql接受来自所有internet IP地址的连接,它可以工作,但不安全。我想限制对Power BI服务器的访问。 如何识别PowerBI传入流量?是否有设置防火墙的最佳做法?您不应打开任何来自Internet的连接。是的,您可以获得所有Azure IP地址的列表,但这并不限制它们仅支持BI,而且每年更新列表几次是一个手动过程。更好的解决方案是在您的
如何识别PowerBI传入流量?是否有设置防火墙的最佳做法?您不应打开任何来自Internet的连接。是的,您可以获得所有Azure IP地址的列表,但这并不限制它们仅支持BI,而且每年更新列表几次是一个手动过程。更好的解决方案是在您的网络中安装,这将允许。在我的情况下,我更喜欢偶尔用官方Microsoft列表中的白名单更新我的pg_hba.conf。生产文件将被新文件覆盖。脚本将替换注释行
#PowerBI
在带有新列表的模板pg_hba.conf文件中
import requests
whiteListUrl = "https://download.microsoft.com/download/7/1/D/71D86715-5596-4529-9B13-DA13A5DE5B63/ServiceTags_Public_20210524.json"
modelFile = "/path/to/template/pg_hba.conf"
outputFileName = "/path/to/production/pg_hba.conf"
userName = "power_bi"
response = requests.get(whiteListUrl)
whiteLists = response.json()
for group in whiteLists["values"]:
if group["name"]!='PowerBI':
continue
text_file = open(modelFile, "r").read()
whiteList = ""
for address in group["properties"]["addressPrefixes"]:
whiteList += "host all {} {} md5\n".format(userName, address)
text_file = text_file.replace("#PowerBI", whiteList)
textfile = open(outputFileName, "w")
a = textfile.write(text_file)
textfile.close()
使用新列表
import requests
whiteListUrl = "https://download.microsoft.com/download/7/1/D/71D86715-5596-4529-9B13-DA13A5DE5B63/ServiceTags_Public_20210524.json"
modelFile = "/path/to/template/pg_hba.conf"
outputFileName = "/path/to/production/pg_hba.conf"
userName = "power_bi"
response = requests.get(whiteListUrl)
whiteLists = response.json()
for group in whiteLists["values"]:
if group["name"]!='PowerBI':
continue
text_file = open(modelFile, "r").read()
whiteList = ""
for address in group["properties"]["addressPrefixes"]:
whiteList += "host all {} {} md5\n".format(userName, address)
text_file = text_file.replace("#PowerBI", whiteList)
textfile = open(outputFileName, "w")
a = textfile.write(text_file)
textfile.close()
您需要将Azure DC IP添加到您的白名单中。我的服务器是Linux Ubuntu macchine。我了解到本地linux实现还不可用。您可以将其安装在网络中任何可以访问Postgresql server的Windows计算机上。它不需要在同一台服务器上。