Linux關閉防火牆

2021-10-01 01:55:31 字數 577 閱讀 7060

1.1開啟指定埠

以開啟rabbitmq埠為例:

firewall-cmd --zone=public --add-port=15672/tcp --permanent
firewall-cmd --reload
1.2 暫時開啟或關閉防火牆
開啟: systemctl start firewalld 或 service iptables start

關閉: systemctl stop firewalld 或 service iptables stop

1.3 永久開啟或關閉防火牆

如果需要永久關閉防火牆的話,僅需在關閉防火牆之後關閉防火牆開機自啟即可,永久開啟同理:

systemctl disable firewalld
systemctl restart firewalld
firewall-cmd --state

Linux 關閉防火牆

centos 6 中防火牆預設是 iptables,而 centos 7 中防火牆預設是 firewall。a 檢視防火牆狀態 service iptable statusb 臨時關閉防火牆 臨時關閉防火牆 servcie iptables stop 臨時啟動防火牆 service iptables...

Linux 關閉防火牆

一.linux下開啟 關閉防火牆命令 1 永久性生效,重啟後不會復原開啟 chkconfig iptables on關閉 chkconfig iptables off 2 即時生效,重啟後復原開啟 service iptables start關閉 service iptables stop 需要說明...

linux關閉防火牆

1 重啟後生效 開啟 chkconfig iptables on 關閉 chkconfig iptables off 2 即時生效,重啟後失效 開啟 service iptables start 關閉 service iptables stop 需要說明的是對於linux下的其它服務都可以用以上命令...