linux关防火墙和SElinux

 

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 ,然后重启。

 

posted @ 2017-05-24 14:45  星星之火pxl  阅读(193)  评论(0编辑  收藏  举报