I'd like to disable protected-mode
on my production Redis. Regarding to the following error I got from my other Redis-Sentinel instance I could disable it live by connecting to Redis from the master machine it runs on.
DENIED Redis is running in protected mode because protected mode is enabled, no bind address was specified, no authentication password is requested to clients. In this mode connections are only accepted from the loopback interface. If you want to connect from external computers to Redis you may adopt one of the following solutions:
1) Just disable protected mode sending the command 'CONFIG SET protected-mode no' from the loopback interface by connecting to Redis from the same host the server is running, however MAKE SURE Redis is not publicly accessible from internet if you do so. Use CONFIG REWRITE to make this change permanent.
2) Alternatively you can just disable the protected mode by editing the Redis configuration file, and setting the protected mode option to 'no', and then restarting the server.
3) If you started the server manually just for testing, restart it with the '--protected-mode no' option.
4) Setup a bind address or an authentication password.
NOTE: You only need to do one of the above things in order for the server to start accepting connections from the outside.
But as I connect and try to disable it I get the Error (error) ERR Unsupported CONFIG parameter: protected-mode
.
There's no auth configured or anything else - all security is managed by firewall rules. The redis.conf
is almost default.
Demo
root@svim-redis03 /etc/redis # redis-cli
127.0.0.1:6379> CONFIG GET protected*
(empty list or set)
127.0.0.1:6379> CONFIG GET bind*
1) "bind"
2) "127.0.0.1"
127.0.0.1:6379> CONFIG SET protected-mode no
(error) ERR Unsupported CONFIG parameter: protected-mode
127.0.0.1:6379> exit
root@svim-redis03 /etc/redis # redis-server --version
Redis server v=3.2.9 sha=00000000:0 malloc=jemalloc-4.0.3 bits=64 build=86450d2ba8219c1e
Is there anything I need to check or change before? I couldn't find any hint in the documentation or in GitHub issues.
Update 01
It's not even possible to change the bind-address or any other config parameter. Do I need to enable config changes first?
127.0.0.1:6379> config set bind "127.0.0.1 11.12.13.14"
(error) ERR Unsupported CONFIG parameter: bind