Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Linux基礎 >> Linux技術

Linux 筆記基礎篇:做實驗前先把防火牆與 SELinux 關掉

時間:2016 年 10 月 30 號

做 Linux 實驗時,通常都會先把系統防火牆關掉,免得中途被它攔住而誤判結果。

系統裝好之後,把 iptables 與 SELinux 一并關閉。先查看防火牆狀態:

service iptables status

查看 SELinux 狀態:

/usr/sbin/sestatus -v

臨時關閉防火牆:

service iptables stop

永久關閉防火牆(需重啟才生效):

chkconfig iptables off

永久關閉 SELinux:編輯 vim /etc/selinux/config,把 SELINUX=enforcing 改成 SELINUX=disabled,存檔退出即可。

enforcing = 開啟;disabled = 關閉。

Copyright © Linux教程網 All Rights Reserved