解决: keepalived启动后iptables会增加一条"DROP all -- anywhere"规则
- keepalived部署完发现,iptables规则有一条"DROP all -- anywhere",如下所示:
keepalived部署完发现,iptables规则有一条"DROP all – anywhere",如下所示:
代码语言:javascript复制[root@h8 ~]# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere tcp dpt:mysql
ACCEPT vrrp -- anywhere anywhere
DROP all -- anywhere h8
即使手动iptables -F 后,每次keepalived发生切换,这条规则又出现了。
解决方法:
代码语言:javascript复制1. 在keepalived.conf配置文件中,删除"vrrp_strict"
2. 重启keeplived