我的目的就是让A,B两台服务器能够访问部署在A上的Redis。
文档里说,Redis 2.8以上的版本支持在配置文件里bind多个IP,例如:
bind 192.168.1.100 10.0.0.1
我是2.8以上的版本,然后按照这样的方式,进行了如下设置:
bind IP-A IP-B
可是发现结果A和B都不能访问了。请问这是什么原因呢?我配置错了吗?
另外我知道注释掉原来的bind 127.0.0.1可以放开访问权限,然后再用防火墙进行限制。但我想弄清楚上面的问题。如有回复,非常感谢!
Hello, this problem is caused by a misunderstanding caused by many documents explaining bind. Many places are translated as follows:
However, in fact, what should be bound is the IP of the network card of the server where redis is located. In other words, if your redis server has two network cards, one is ip-1 and the other is ip-2, if you bind ip-1. Then only the request for ip-1 will be accepted.
You can refer to this article: bind in redis and external network access
For the correct answer upstairs, see what is stated in redis.conf.
Is it possible to bind the internal network and external network IP at the same time