Networking security

Redis is meant to run in a trusted network, but that is not always the case. Currently, many Redis servers are deployed on public clouds, meaning security is a concern.

There are many ways to make Redis secure, such as the following:

  • Use firewall rules to block access from unknown clients
  • Run Redis on the loopback interface, rather than a publicly accessible network interface
  • Run Redis in a virtual private cloud instead of the public Internet
  • Encrypt client-to-server communication

Protecting Redis with firewall rules

Firewall rules are a safe alternative to protect a Redis server, but it is required to have a list of all the trusted Classless Inter-Domain Routing (CIDR) blocks of the possible clients. In a Unix-like server, the

Get Redis Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.