1.Linux7.2設置防火牆關閉,打開,永久關閉
第一種方式:
systemctl stop firewalld.service
systemctl start firewalld.service
systemctl disable firewalld.service
第二種方式:
systemctl start firewalld
systemctl stop firewalld
centos7.3 上述方式可能無法開啓,可以先
systemctl unmask firewalld.service
然後
systemctl start firewalld.service
2.Linux6.8設置防火牆關閉,打開,查看狀態
service iptables stop
service iptables start
service iptables status
3.如何沒有iptables命令還想使用iptables操作防火牆,則執行下面的命令
yum install iptables-services
然後就可以在Linux7.X中使用iptables進行啓動關閉防火牆了
systemctl enable iptables
systemctl stop iptables
systemctl start iptables
systemctl restart iptables
systemctl reload iptables
如何解決了您的問題,還希望來JAVA WEB開發交流羣:958923746,有問題歡迎共享,共同提升!