首页 > 系统服务 > 详细

linux关防火墙和SElinux

时间:2017-05-24 15:23:59      阅读:263      评论:0      收藏:0      [点我收藏+]

 

Linux关闭防火墙

  •  重启后永久性生效:

  开启: chkconfig iptables on

  关闭: chkconfig iptables off

  • 即时生效,重启后失效:

  开启: service iptables start

  关闭: service iptables stop

  • 临时关闭防火墙 
    systemctl stop firewalld
  • 永久防火墙开机自关闭 
    systemctl disable firewalld
  • 临时打开防火墙 
    systemctl start firewalld
  • 防火墙开机启动 
    systemctl enable firewalld
  • 查看防火墙状态 
    systemctl status firewalld

Linux关闭SELinux

  • 临时关闭SELinux 
    setenforce 0
  • 临时打开SELinux 
    setenforce 1
  • 查看SELinux状态 
    getenforce
  • 开机关闭SELinux 

修改 /etc/selinux/config 文件中的 SELINUX="" 为 disabled ,然后重启。

 

linux关防火墙和SElinux

原文:http://www.cnblogs.com/pxl0/p/6898868.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!