Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Configure firewall under CentOS7 to let Keepalived go

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

Keepalived is a lightweight HA clustering solution, but when the firewall is turned on, each node cannot perceive the state of other nodes, and each node is bound with virtual IP. Many articles on the Internet talk about configuring firewall to let tcp/112 go, which is invalid under CentOS7. The correct way is to configure let go vrrp protocol, as follows:

Firewall-cmd-- direct-- permanent-- add-rule ipv4 filter INPUT 0-- destination 224.0.0.18-- protocol vrrp-j ACCEPTfirewall-cmd-- direct-permanent-- add-rule ipv4 filter OUTPUT 0-- destination 224.0.0.18-- protocol vrrp-j ACCEPTfirewall-cmd-- reload

Keepalived uses vrrp multicast, and the default address is 224.0.0.18, so configure the firewall to let it go.

Check with ip addr after completion, the cluster is normal, only the primary node is bound to virtual IP, and the backup node will not be bound.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report