apt install redis-server
sudo systemctl enable redis
sudo systemctl restart redis
sudo systemctl status redis
Edit /etc/redis/redis.conf
:
supervised systemd
bind 0.0.0.0
requirepass your_password
You can use openssl rand 60 | openssl base64 -A
to generate a strong password.
Restart Redis server by running sudo systemctl restart redis
.
sudo apt-get install ufw
sudo ufw enable
sudo ufw status
sudo ufw allow proto tcp from client_ip_address to any port 6379