centos7下 開啟/關閉/查看firewall運行狀態命令


1.開啟防火牆:systemctl start firewalld.service

[root@localhost bin]# systemctl start firewalld.service
[root@localhost bin]#

2.查看狀態:firewall-cmd --state 開啟狀態:running 關閉狀態:not running

[root@localhost bin]# firewall-cmd --state
running

3.關閉防火牆:systemctl stop firewalld.service

[root@localhost bin]# systemctl stop firewalld.service
[root@localhost bin]# firewall-cmd --state
not running

4.開機不啟動防火牆:systemctl disable firewalld.service

[root@localhost bin]# systemctl disable firewalld.service
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.
[root@localhost bin]# 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM