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]	//爲目標地址,按需替換
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章