簡體   English   中英

使用 Powershell / Azure CLI 禁用對 Cosmos DB 的數據中心網絡訪問

[英]Disabling Datacenter Network Access to Cosmos DB Using Powershell / Azure CLI

我瀏覽了文檔以找到一種方法,使用 Powershell 或 Z3A580F142203677F1F0ZBC309,在“防火牆和虛擬網絡”設置頁面上禁用“接受來自公共 Azure 數據中心內的連接”選項,但是。 有人能做到嗎?

防火牆和虛擬網絡設置

當該選項“接受公共Azure數據中心的連接”時,檢查了一個值0.0.0.0的條目,將其納入允許的IP Rannges 這個0.0.0.0 IP 地址基本上告訴 Cosmos DB 接受來自公共 Azure 數據中心的連接。 要阻止此訪問,您只需從ipRangeFilter中刪除0.0.0.0 ip 地址。

要獲取屬性,您將使用az cosmos show

az cosmos show --name <cosmosdb-account-name> --resource-group <resource-group-name>`

要更新 ip 范圍,您將使用az cosmos update

az cosmosdb update  --name <cosmosdb-account-name> --resource-group <resource-group-name> --ip-range-filter "104.42.195.92,40.76.54.131,52.176.6.30,52.169.50.45,52.187.184.26"

上述命令將阻止從公共 Azure 數據中心訪問 cosmos db,但允許從 Azure 門戶訪問。

Azure PowerShell 中的等效命令是Get-AzCosmosDBAccountUpdate-AzCosmosDBAccount

您可以在此處閱讀更多相關信息: https://docs.microsoft.com/en-gb/azure/cosmos-db/how-to-configure-firewall

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM