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