1.确认配置文件bind的ip是否正确,一般想要外网能访问,需要填写为0.0.0.0,表示监听任何ip

注意任何人都能访问,一定要开启密码 requirepass 你的密码

2.确认protected-mode 是否为 no

3.修改完配置文件后重启Redis

service redis restart

4.确认防火墙是否开启

service iptables status

5.如果是开启状态关闭,再进行尝试

service iptables stop

如果可以连接,表示防护墙规则有问题

6.检查防火墙规则(建议使用sftp)

vim /etc/sysconfig/iptables

注意这里的顺序很重要

 redis本地能访问外网不能访问问题

 

 

7.修改之后进行保存,然后重启iptables

service iptables restart

相关文章:

  • 2022-12-23
  • 2021-04-21
  • 2022-01-19
  • 2022-12-23
  • 2021-06-24
  • 2021-08-30
  • 2022-12-23
  • 2021-05-28
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-20
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案