I'm using php-redis as a session manger and I'm having a weird problem.
I run on one Centos 6.4 machine php and in another server I have redis, so everything works fine if I disable the firewall of the php machine.
But as soon as I start iptables, php-redis won't connect to the redis server.
I, of course have a rule, but obviously is not working:
iptables -A INPUT -p tcp --dport 6379 -j ACCEPT;
I have restarted iptables and checked correctly that the rule is applied. Anyone know what's going on?
Did you try this ?
iptables -N REDIS iptables -A REDIS -s localhost -j ACCEPT iptables -A REDIS -s 127.0.0.1 -j ACCEPT iptables -A REDIS -j LOG --log-prefix "unauth-redis-access" iptables -A REDIS -j REJECT --reject-with icmp-port-unreachable iptables -I INPUT -p tcp --dport 6379 -j REDIS
https://serverfault.com/questions/532075/redis-no-route-to-host-when-pinging-a-remote-redis-host
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.