
==打開保護模式==
protected-mode yes
==修改默認6379端口==
port 8793
==禁用或者重命名危險命令==
修改 redis.conf 文件,添加
rename-command FLUSHALL "" rename-command FLUSHDB "" rename-command CONFIG "" rename-command KEYS "" rename-command SHUTDOWN "" rename-command DEL "" rename-command EVAL ""
重命名為"" 代表禁用命令,如想保留命令,可以重命名為不可猜測的字符串,如:rename-command FLUSHALL joYAPNXRPmcarcR4ZDgC
==限制redis 配置文件訪問權限==
chmod 600 /<filepath>/redis.conf
--END--
