zoukankan      html  css  js  c++  java
  • Linux:系统安全相关优化,(firewalld、iptables、selinux)

    系统安全相关优化(将一些安全服务进行关闭)

    1. 防火墙服务程序

    centos6

       查看防护墙服务状态
       /etc/init.d/iptables status
       
       临时关闭防火墙服务
       /etc/init.d/iptables stop
       /etc/init.d/iptables status
       
       永久关闭防火墙服务
       chkconfig iptables off
    

    centos7

       查看防火墙服务状态
       systemctl status firewalld
       
       临时关闭防火墙服务
       systemctl stop firewalld
       systemctl status firewalld  -- 操作完确认
       
       永久关闭防火墙服务
       systemctl disable firewalld
       
       补充: 查看服务状态信息简便方法
       systemctl is-active firewalld   --- 检查服务是否正常运行
       systemctl is-enabled firewalld  --- 检查确认服务是否开机运行
    

    2. 系统的selinux服务程序

       selinux服务对root用户权限进行控制
       很多企业中:selinux服务默认关闭
       centos6==centos7 
    

    临时关闭:

       检查确认: 
       getenforce    --- 确认selinux服务是否开启或是关闭的
       如何关闭:  
       [root@oldboyedu ~]# setenforce 
           usage:  setenforce [ Enforcing | Permissive | 1 | 0 ]
           Enforcing   1  --- 临时开启selinux
       Permissive  0  --- 临时关闭selinux
       
       setenforce 0   --- 临时关闭selinux服务
    

    永久关闭:

       enforcing 	- SELinux security policy is enforced.            selinux服务处于正常开启状态
           permissive 	- SELinux prints warnings instead of enforcing.   selinux服务被临时关闭了
           disabled 	- No SELinux policy is loaded.                    selinux服务彻底关闭
       
           vi /etc/selinux/config
       SELINUX=disabled
    

    PS: 如果想让selinux配置文件生效,重启系统

  • 相关阅读:
    splunk linux安装
    [读书笔记]-时间管理-把时间当做朋友
    [读书笔记]-技术学习-Redis
    [读书笔记]-阅读方法-王者速读法
    vuex、localStorage、sessionStorage之间的区别
    vuex的使用
    Vue常用指令总结
    vue-router参数传递
    Vue-router的基本使用
    v-on精炼
  • 原文地址:https://www.cnblogs.com/moox/p/12145143.html
Copyright © 2011-2022 走看看