加强redis安全可从以下方面切入
1. 使用非root用户启动redis
2. 给redis设置密码
3.绑定本地通信
4.禁用敏感命令
首先查看redis
可知该redis是通过root用户运行的
添加redis用户
redis-cli -h 127.0.0.1
#进入redis通信
set name ciel
#如果显示ok则不需要密码,如果error,报错,没权限,则已设置密码
#在redis.conf设置密码
#requirepass footbar
找到requirepass 去掉#号,并设置一个复杂的密码
#查找bind,去掉#号
#bind 127.0.0.1
#查找rename-command,设置如下
rename-command CONFIG ""
rename-command flushall ""
rename-command flushdb ""
用redis用户启动redis-server
setsid sudo -u redis /usr/bin/redis-server /etc/redis.conf