Open Redis port for remote connections

后端 未结 10 2037
隐瞒了意图╮
隐瞒了意图╮ 2020-12-07 10:00

I can ping pong Redis on the server:

# redis-cli ping
PONG

But remotely, I got problems:

$ src/redis-cli -h REMOTE.IP ping
         


        
10条回答
  •  无人及你
    2020-12-07 10:48

    A quick note that if you are using AWS ec2 instance then there is one more extra step that I believe is also mandatory. I missed the step-3 and it took me whole day to figure out to add an inbound rule to security group

    Step 1(as previous): in your redis.conf change bind 127.0.0.1 to bind 0.0.0.0

    Step2(as previous): in your redis.conf change protected-mode yes to protected-mode no

    important for Amazon Ec2 Instance:

    Step3: In your current ec2 machine go to the security group. add an inbound rule for custom TCP with 6379 port and select option "use from anywhere".

提交回复
热议问题