Linux下Keepalived firewall规则设置

//系统
CentOS Linux release 7.7.1908 (Core)
# firewall-cmd --direct --permanent --add-rule ipv4 filter INPUT 0 \
--in-interface [AdapterName] --destination [destination address] --protocol vrrp -j ACCEPT
  
# firewall-cmd --direct --permanent --add-rule ipv4 filter OUTPUT 0 \
--out-interface [AdapterName] --destination [AdapterName] --protocol vrrp -j ACCEPT

# firewall-cmd --reload	//或重启firewalld
# systemctl restart firewalld

[AdapterName]	//为网卡名称,按需替换
[AdapterName]	//为目标地址,按需替换
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章