Review the Redis firewall address range

Check both ends of the Redis firewall range and allow only the client addresses that need access.

Description

This task sets start_ip_address to 0.0.0.0 and end_ip_address to 255.255.255.255, allowing every IPv4 source. Any client that can reach the public endpoint can attempt a connection. Redis authentication and permissions still apply.

Potential impact

Stolen credentials or weak authentication could let an unauthorized client read or change cached data or disrupt the service.

Remediation

  • Review all firewall rules together. Allow only approved client source IPs as seen by the cache, or the smallest required ranges.
  • For private connectivity, configure and verify the private endpoint and DNS path before disabling public network access. Listing private IPs alone does not create a private connection.

Examples

The playbook lists azure.azcollection in collections. By default (state: present), Ansible creates myRule on the existing cache or updates the rule if its IP range changes. Replace 203.0.113.10 with the approved client’s source IP.

Before

yaml
- name: Allow all IPv4 source addresses in the Redis firewall rule
  azure_rm_rediscachefirewallrule:
    resource_group: myResourceGroup
    cache_name: myRedisCache
    name: myRule
    start_ip_address: 0.0.0.0
    end_ip_address: 255.255.255.255

After

yaml
- name: Restrict the Redis firewall rule to one approved client IP
  azure_rm_rediscachefirewallrule:
    resource_group: myResourceGroup
    cache_name: myRedisCache
    name: myRule
    start_ip_address: 203.0.113.10
    end_ip_address: 203.0.113.10

Explanation: The full IPv4 range is narrowed to one approved address. Update any other rules that still permit broad access.

References