[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)為關(guān)閉狀態(tài),active (running)為開啟狀態(tài)
創(chuàng)新互聯(lián)主營(yíng)遂溪網(wǎng)站建設(shè)的網(wǎng)絡(luò)公司,主營(yíng)網(wǎng)站建設(shè)方案,app軟件定制開發(fā),遂溪h5重慶小程序開發(fā)公司搭建,遂溪網(wǎng)站營(yíng)銷推廣歡迎遂溪等地區(qū)企業(yè)咨詢
[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
Enforcing
selinux狀態(tài)有三種模式:
enforcing:強(qiáng)制模式,代表selinux運(yùn)行中,且已經(jīng)正確的開始限制domain/type了。
permissive:寬容模式,代表selinux運(yùn)作中,不過(guò)僅會(huì)有警告信息并不會(huì)實(shí)際限制domain/type的訪問(wèn)。這種模式可以用來(lái)作為selinux的debug之用
disabled:關(guān)閉,selinux沒(méi)有實(shí)際運(yùn)行。
命令設(shè)置SELinux,前提不能是disabled狀態(tài):
[root@localhost ~]# setenforce 0
[root@localhost ~]# getenforce
Permissive
其中setenforce 0|1
0:設(shè)置為premissive狀態(tài);
1:設(shè)置為enforcing狀態(tài);
此設(shè)置:重啟系統(tǒng)后無(wú)效。
修改配置文件,設(shè)置selinux為disabled狀態(tài):
[root@localhost ~]# vim /etc/selinux/config
SELINUX=disabled
SELINUXTYPE=targeted
保存,重啟系統(tǒng)生效。
當(dāng)前文章:Linux下防火墻和selinux的啟動(dòng)、關(guān)閉和查看
本文鏈接:http://www.rwnh.cn/article26/jipocg.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站維護(hù)、網(wǎng)站設(shè)計(jì)公司、全網(wǎng)營(yíng)銷推廣、動(dòng)態(tài)網(wǎng)站、網(wǎng)站營(yíng)銷、響應(yīng)式網(wǎng)站
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)