Redis之远程访问问题-yellowcong
2017-10-26 16:52
183 查看
我把redis安装在docker上面后,发现访问不上,后来发现,是redis.conf配置文件的问题,默认情况下,只能本地访问,绑定的是127.0.0.1端口,如果想远程访问,需要两部操作1、注释掉bind 127.0.0.1 ,2、修改
bind 192.168.1.101 表是接收来自192.168.1.101发送过来的请求。
在集群的情况下,必须绑定本机的ip,不然远程连接不上,默认走127.0.0.1
protected-mode yes为
protected-mode no(这个地方的前提是,我把防火墙关掉了,不考虑防火墙的问题)
1、注释掉bind
如果bind选项为空的话,那会接受所有来自于可用网络接口的连接。bind 192.168.1.101 表是接收来自192.168.1.101发送过来的请求。
在集群的情况下,必须绑定本机的ip,不然远程连接不上,默认走127.0.0.1
2、设定protected-mode
# Protected mode is a layer of security protection, in order to avoid that # Redis instances left open on the internet are accessed and exploited. # # When protected mode is on and if: # # 1) The server is not binding explicitly to a set of addresses using the # "bind" directive. # 2) No password is configured. # # The server only accepts connections from clients connecting from the # IPv4 and IPv6 loopback addresses 127.0.0.1 and ::1, and from Unix domain # sockets. # # By default protected mode is enabled. You should disable it only if # you are sure you want clients from other hosts to connect to Redis # even if no authentication is configured, nor a specific set of interfaces # are explicitly listed using the "bind" directive. protected-mode no
相关文章推荐
- SpringBoot远程访问redis服务器问题剖析
- linux远程访问问题
- mysql Error 1130 远程连接访问 问题的解决方案
- 关于sql 2005 express 远程访问和sa密码的问题(转帖)
- [置顶] redis开启远程访问
- redis安装配置jedis客户端访问redis相关问题总结
- 关于修改mysql远程访问权限的问题
- redis-cli远程连接redis-server服务器的问题
- sql 2005 express 远程访问和sa密码的问题
- wamp无法远程访问的问题
- 远程访问sqlite数据库问题
- WMI远程访问问题解决方法
- 2014年12月9日 解决了mySql不能远程访问的问题
- java远程共享文件访问jcifs解决密码中特殊符号问题
- JavaScript访问远程Servlet的跨域问题
- MySQL远程访问问题
- Redis开启远程访问
- 阿里云部署redis服务器,以及远程访问
- [置顶] redis开启远程连接访问
- 在Ubuntu中安装Redis,设置密码,远程访问