Security settings such as Redis password settings, access rights control, and more

Source: Internet
Author: User

Security settings such as Redis password settings, access rights control, and more

Heat4 Reviews 242

Www.BkJia.Com netizens share: 2014-05-29 01:05:18 views 30,160 times

Redis as a high-speed database, on the Internet, must have a corresponding security mechanism to protect.

1. A more secure approach is to use a binding IP to control.

Copy CodeThe code is as follows:
Bind 127.0.0.1
Indicates that access is only allowed through the 127.0.0.1 IP address. In fact, only oneself can access himself, other machines can not access him.

This order is to be changed in redis.conf.

Please note here

The starting mode we use Src/redis-server

Change to Src/redis-server redis.conf

Because it needs to load the configuration file.

This method is not very good, I would inevitably have more than one machine access to a Redis service

2. Set the password to provide remote login

Redis.conf
Found it
Requirepass
Write on
Requirepass YourPassword
After setting the password, I found that I could login, but couldn't execute the command.

Copy CodeThe code is as follows:
Src/redis-cli-h 192.168.1.121
Keys *
(Error) ERR Operation not permitted
Authorization commands
Copy CodeThe code is as follows: Auth 123456
Login with password mode
Copy CodeThe code is as follows:./redis-cli-h 192.168.1.121-a ABCD
Because the Redis concurrency is extremely strong, only the password, the attacker may send a large number of short-guessing password requests, it is easy to brute force, so it is recommended that the longer the password the better, such as 20-bit. (The password is clear in the Conf file, so don't worry about forgetting it)

Security settings such as Redis password settings, access rights control, and more

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.