I want to deny all the public traffic from accessing my cache redis, I could not find any proper solution, any help will be appriciated.
How can I deny all the public access to my azure cache for redis?
1.2k Views Asked by Ashutosh Sharma At
2
There are 2 best solutions below
0
On
As the question is about denying the public traffic, I would suggest you to do it via Azure built in policy.
Azure Cache for Redis should disable public network access denies the public endpoint access. Assign this at the appropriate level in your tenant.
Here is the snippet from above policy definition::
"policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.Cache/Redis"
},
{
"field": "Microsoft.Cache/Redis/publicNetworkAccess",
"notEquals": "Disabled"
}
]
},
"then": {
"effect": "[parameters('effect')]"
}
}
You can make use of
Private Endpointto do that. Instructions specific to securing an Azure Cache for Redis so that it is not accessible publicly can be found here: https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/cache-private-link.