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 iptables program can be used to set up firewall rules.
The iptables program is a standard firewall created in 1998 by Rusty Russell. It is included in most Linux distributions by default. Most of the explanation of iptables is not applicable for Windows...