linux关闭和开启防火墙(Ubuntu、centos、Redhat)
生活随笔
收集整理的這篇文章主要介紹了
linux关闭和开启防火墙(Ubuntu、centos、Redhat)
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
#一、ubuntu
1、關閉ubuntu的防火墻
ufw disable2、開啟防火墻
ufw enable3、卸載了iptables
apt-get remove iptables4、關閉ubuntu中的防火墻的其余命令
iptables -P INPUT ACCEPTiptables -P FORWARD ACCEPTiptables -P OUTPUT ACCEPTiptables -F二、centos
打開防火墻:
service iptables start關閉防火墻:
service iptables stop查看防火墻狀態:
service iptables status三、redhat
3.1、永久關閉,重啟后生效:
開啟:
chkconfig iptables on關閉:
chkconfig iptables off3.2、臨時開啟,重啟后失效:
開啟:
service iptables start關閉:
service iptables stop 《新程序員》:云原生和全面數字化實踐50位技術專家共同創作,文字、視頻、音頻交互閱讀總結
以上是生活随笔為你收集整理的linux关闭和开启防火墙(Ubuntu、centos、Redhat)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: touch: cannot touch
- 下一篇: Windows的cmd ping不通vm