[root@localhost sunan]# systemctl status firewalld.service
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
Active: inactive (dead)
Docs: man:firewalld(1)其中Active為inactive (dead)為關閉狀態,active (running)為開啟狀態

創新互聯主營遂溪網站建設的網絡公司,主營網站建設方案,app軟件定制開發,遂溪h5重慶小程序開發公司搭建,遂溪網站營銷推廣歡迎遂溪等地區企業咨詢
[root@localhost sunan]# systemctl stop firewalld.service
[root@localhost sunan]# systemctl start firewalld.service
[root@localhost sunan]# systemctl disable firewalld.service
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
[root@localhost sunan]# systemctl enable firewalld.service
Created symlink from /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service to /usr/lib/systemd/system/firewalld.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/firewalld.service to /usr/lib/systemd/system/firewalld.service.
[root@localhost ~]# service iptables status
[root@localhost ~]# service iptables stop
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Flushing firewall rules: [ OK ]
iptables: Unloading modules: [ OK ]
[root@localhost ~]# service iptables start
iptables: Applying firewall rules: [ OK ]
[root@localhost ~]# chkconfig iptables off
[root@localhost ~]# chkconfig iptables on
[root@localhost sunan]# getenforce
Enforcingselinux狀態有三種模式:
enforcing:強制模式,代表selinux運行中,且已經正確的開始限制domain/type了。
permissive:寬容模式,代表selinux運作中,不過僅會有警告信息并不會實際限制domain/type的訪問。這種模式可以用來作為selinux的debug之用
disabled:關閉,selinux沒有實際運行。
命令設置SELinux,前提不能是disabled狀態:
[root@localhost ~]# setenforce 0
[root@localhost ~]# getenforce
Permissive其中setenforce 0|1
0:設置為premissive狀態;
1:設置為enforcing狀態;
此設置:重啟系統后無效。
修改配置文件,設置selinux為disabled狀態:
[root@localhost ~]# vim /etc/selinux/config
SELINUX=disabled
SELINUXTYPE=targeted保存,重啟系統生效。
當前文章:Linux下防火墻和selinux的啟動、關閉和查看
本文鏈接:http://www.js-pz168.com/article26/jipocg.html
成都網站建設公司_創新互聯,為您提供網站維護、網站設計公司、全網營銷推廣、動態網站、網站營銷、響應式網站
聲明:本網站發布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經允許不得轉載,或轉載時需注明來源: 創新互聯