栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

Centos7-keepalived配置 firewalld 防火墙

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Centos7-keepalived配置 firewalld 防火墙

Centos7-keepalived配置 firewalld 防火墙: 现象:
主备节点同时绑定VIP无法切换。
查看 firewalld 状态:

查看 firewalld 状态

systemctl status firewalld

启动 firewalld

systemctl start firewalld

关闭 firewalld

systemctl stop firewalld
配置方法:

配置前需要启动 firewall 服务

systemctl start firewalld

使用 firewall 配置

firewall-cmd --add-rich-rule='rule protocol value="vrrp" accept' --permanent
firewall-cmd --reload

使用 iptables 配置

iptables -I INPUT -p vrrp -j ACCEPT
iptables-save > /etc/sysconfig/iptables
systemctl restart iptables
参考文档

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/load_balancer_administration/s1-lvs-connect-vsa

Firewall Requirements
If you are running a firewall (by means of firewalld or iptables), you must allow VRRP traffic to pass between the keepalived nodes. To configure the firewall to allow the VRRP traffic with firewalld, run the following commands:
# firewall-cmd --add-rich-rule='rule protocol value="vrrp" accept' --permanent
# firewall-cmd --reload
If the zone is omitted the default zone will be used.
If, however, you need to allow the VRRP traffic with iptables, run the following commands:
# iptables -I INPUT -p vrrp -j ACCEPT
# iptables-save > /etc/sysconfig/iptables
# systemctl restart iptables
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/321488.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号