歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux技術 >> Redhat關閉SELinux和防火牆的辦法

Redhat關閉SELinux和防火牆的辦法

日期:2017/3/3 11:53:33   编辑:Linux技術
Redhat關閉SELinux和防火牆的辦法
分類:
Redhat使用了SELinux來增強安全,關閉的辦法為:
1. 永久有效
修改 /etc/selinux/config 文件中的 SELINUX="" 為 disabled ,然後重啟。
2. 即時生效
setenforce 0
關閉防火牆的方法為:
1. 永久性生效
開啟:chkconfig iptables on
關閉:chkconfig iptables off
2. 即時生效,重啟後失效
開啟:service iptables start
關閉:service iptables stop
需要說明的是對於 Linux 下的其它服務都可以用以上命令執行開啟和關閉操作
補充:
a. 防火牆還需要關閉ipv6的防火牆:
chkconfig ip6tables off
並且可以通過如下命令查看狀態:
chkconfig --list iptables
b. selinux狀態可以通過以下命令查看:
sestatus
Copyright © Linux教程網 All Rights Reserved