Redis enable remote connection and set security authorization to prevent data leakage or other losses caused by unauthorized access.

redis.conf

Remote connection

# bind 127.0.0.1
bind 0.0.0.0

Security authorization

requirepass <password>

Other

daemonize yes
protected-mode no