Use a configuration file where the bind directive is set in order to guarantee that Redis listens on only the network interfaces you are using.Make sure the port Redis uses to listen for connections (by default 6379 and additionally 16379 if you run Redis in cluster mode, plus 26379 for Sentinel) is firewalled, so that it is not possible to contact Redis from the outside world.If you are not 100% sure your environment is secured properly, please check the following steps in order to make Redis more secure: However if an unhardened Redis is exposed to the internet, it is a big security concern. If you use Redis in a very controlled environment, separated from the external internet and in general from attackers, that's fine. $ redis-cliīy default Redis binds to all the interfaces and has no authentication at all. You can type different commands and see their replies. You can change the host and port used by redis-cli - just try the -help option to check the usage information.Īnother interesting way to run redis-cli is without arguments: the program will start in interactive mode. Running redis-cli followed by a command name and its arguments will send this command to the Redis instance running on localhost at port 6379. The first thing to do in order to check if Redis is working properly is sending a PING command using redis-cli: $ redis-cli ping However to make hacking with Redis simpler Redis provides a command line utility that can be used to send commands to Redis. This protocol is implemented in the Redis client libraries for the different programming languages. Once you have Redis up and running, you can connect using redis-cli.Įxternal programs talk to Redis using a TCP socket and a Redis specific protocol.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |