阿里云安骑士-Centos7系统基线合规检测-修复记录
执行命令
sysctl -w net.ipv4.conf.all.send_redirects=0
sysctl -w net.ipv4.conf.default.send_redirects=0
sysctl -w net.ipv4.conf.all.accept_redirects=0
sysctl -w net.ipv4.conf.default.accept_redirects=0
sysctl -w net.ipv4.conf.all.secure_redirects=0
sysctl -w net.ipv4.conf.default.secure_redirects=0
sysctl -w net.ipv4.conf.all.rp_filter=1
sysctl -w net.ipv4.conf.default.rp_filter=1
执行命令查看结果
sysctl net.ipv4.conf.all.send_redirects
sysctl net.ipv4.conf.default.send_redirects
sysctl net.ipv4.conf.all.accept_redirects
sysctl net.ipv4.conf.default.accept_redirects
sysctl net.ipv4.conf.all.secure_redirects
sysctl net.ipv4.conf.default.secure_redirects
sysctl net.ipv4.conf.all.rp_filter
sysctl net.ipv4.conf.default.rp_filter
修改配置文件
vi /etc/sysctl.conf
net.ipv4.conf.all.send_redirects=0
net.ipv4.conf.default.send_redirects=0
net.ipv4.conf.all.accept_redirects=0
net.ipv4.conf.default.accept_redirects=0
net.ipv4.conf.all.secure_redirects=0
net.ipv4.conf.default.secure_redirects=0
net.ipv4.conf.all.rp_filter=1
net.ipv4.conf.default.rp_filter=1
执行命令
sysctl -w net.ipv6.conf.all.accept_ra=0
sysctl -w net.ipv6.conf.default.accept_ra=0
sysctl -w net.ipv6.conf.all.accept_redirects=0
sysctl -w net.ipv6.conf.default.accept_redirects=0
执行命令查看结果
sysctl net.ipv6.conf.all.accept_ra
sysctl net.ipv6.conf.default.accept_ra
sysctl net.ipv6.conf.all.accept_redirects
sysctl net.ipv6.conf.default.accept_redirects
修改配置文件
vi /etc/sysctl.conf
net.ipv6.conf.all.accept_ra=0
net.ipv6.conf.default.accept_ra=0
net.ipv6.conf.all.accept_redirects=0
net.ipv6.conf.default.accept_redirects=0
执行命令
chmod 0600 /boot/grub2/grub.cfg
chmod 0600 /etc/crontab
chmod 0600 /etc/cron.hourly
chmod 0600 /etc/cron.daily
chmod 0600 /etc/cron.weekly
chmod 0600 /etc/cron.monthly
chmod 0600 /etc/cron.d
useradd -D -f 1095
修改配置文件(取消注释)
vi /etc/ssh/sshd_config
LogLevel INFO
MaxAuthTries
IgnoreRhosts yes
HostbasedAuthentication no
PermitEmptyPasswords no
PermitUserEnvironment no
LoginGraceTime
修改配置文件(取消注释或修改参数)
vi /etc/security/pwquality.conf
minlen=10
dcredit=-1
ucredit=-1
lcredit=-1
ocredit=-1
修改配置文件(添加配置)
vi /etc/pam.d/password-auth
password sufficient pam_unix.so remember=3
修改配置文件(添加配置)
vi /etc/pam.d/system-auth
password sufficient pam_unix.so remember=3
修改配置文件(添加配置)
vi /etc/rsyslog.conf
$FileCreateMode 0640
修改配置文件
在/etc/login.defs 设置密码修改最小间隔时间,建议值7
检查项: 禁止root直接登录
加固建议: 注意:在修改此项之前,请务必创建一个可登陆账号;在/etc/ssh/sshd_config中PermitRootLogin的值:yes设置为no
检查项: 默认登录端口检测
加固建议: 在/etc/ssh/sshd_config中取消Port 22注释符号#,并修改22为其它值
附:
风险分类:合规基线检测-Centos7系统基线合规检测
检测项说明:按照CIS-Linux Centos7最新基线标准进行系统层面基线检测
阿里云安骑士-Centos7系统基线合规检测-修复记录的更多相关文章
- 解决阿里云安骑士漏洞警告:wordpress WPImageEditorImagick 指令注入漏洞
解决:wordpress WPImageEditorImagick 指令注入漏洞 前些天在阿里云服务器上安装了wordpress,阿里云提示有wordpress WP_Image_Editor_Ima ...
- 阿里云ECS 实例Centos7系统磁盘扩容
需求:一台阿里云的数据盘磁盘空间不足,需要扩容,我这里只有一个主分区,ext4文件系统. 因为磁盘扩容场景不同,阿里云的文档比较全面一些,所以先奉上阿里云的文档,下面开始我的操作步骤: 1.登录控制台 ...
- 阿里云ECS服务器CentOS7.2安装Python2.7.13
阿里云ECS服务器CentOS7.2安装Python2.7.13 yum中最新的也是Python 2.6.6,只能下载Python 2.7.9的源代码自己编译安装. 操作步骤如下: 检查CentOS7 ...
- Kubernetes+Docker的云平台在CentOS7系统上的安装
Kubernetes+Docker的云平台在CentOS7系统上的安装 1.运行VirtualBox5. 2.安装CentOS7系统. 注意:选择Basic Server类型 安装过程略. 3.修改计 ...
- 阿里云服务器: centos7 ftp安装
阿里云服务器: centos7 ftp安装 ftp需要您参考下面链接和附件开放安全组20.21.1024-65535 后查看是否正常. 配置步骤如下, 1, 如果没有安装ftp,需要先安装 yum - ...
- Linux基线合规检查中各文件的作用及配置脚本
1./etc/motd 操作:echo " Authorized users only. All activity may be monitored and reported " ...
- Android App隐私合规检测辅助工具(Camille)
Camille Android App隐私合规检测辅助工具,项目仓库:https://github.com/zhengjim/camille 简介 现如今APP隐私合规十分重要,各监管部门不断开展AP ...
- 部署java项目到阿里云服务器(centos7版本)
一.搭建环境 1.搭建java环境(64位) 一.准备压缩包,rpm包或者tar包,将其上传到阿里云对应的文件夹(我用的工具是WinSCP,百度一下就有下载资源) 二.若是rpm包,可以通过 rpm ...
- 搭建阿里云lnmp环境 (centos7+nginx+MySQL5.7.9+PHP7)
阿里云一台服务器出现问题! 我估计是一键安装包环境的原因,所以打算重新搭建下环境! 首先,当然是先做好快照!安全第一! 对系统盘做更换系统操作,装上纯净版的centos. 装好后,进入系统 一.挂载数 ...
随机推荐
- sublime text3的注册码以及常用方法
Michael BarnesSingle User LicenseEA7E-8213858A353C41 872A0D5C DF9B2950 AFF6F667C458EA6D 8EA3C286 98D ...
- spring boot 中使用 Redis 与 Log
spring boot + mybatis + redis 配置 1.application.yml #配置访问的URLserver: servlet-path: /web port: spring: ...
- Python 豆瓣日记爬取
无聊写了个豆瓣日记的小爬虫,requests+bs4. cookies_src可填可不填,主要是为了爬取仅自己可见的日记. url填写的是日记页面,即https://www.douban.com/pe ...
- ORACLE 如何产生一个随机数
1.select dbms_random.string('x', 3) from dual ; x是类型,3是长度. /* opt可取值如下: 'u','U' : 大写字母 'l','L' ...
- 织梦 百度sitemap制作教程
一.新建一个sitemap.htm模板 登录dedecms后台,选择[模板]-[模板管理]-[默认模板管理] 点击最下面的[新建模板]新建一个模板,并复制下面这段代码进去(将代码中的域名改为自己的): ...
- 彻底弄懂tf.Variable、tf.get_variable、tf.variable_scope以及tf.name_scope异同
https://blog.csdn.net/qq_22522663/article/details/78729029 1. tf.Variable与tf.get_variabletensorflow提 ...
- FPGA功耗那些事儿(转载)
在项目设计初期,基于硬件电源模块的设计考虑,对FPGA设计中的功耗估计是必不可少的.笔者经历过一个项目,整个系统的功耗达到了100w,而单片FPGA的功耗估计得到为20w左右,有点过高了,功耗过高则会 ...
- HA状态下防火墙损坏处理
问题描述: web登录防火墙管理地址,发现在 状态-系统信息 里集群成员只有一台原备机.到机房发现原主机只有power灯是亮着的,HA灯和status灯都不亮. 用笔记本直连防火墙的mgmt口不亮,c ...
- ajax POST跨域请求完美解决
方式: js前端请求: function getOcrInfo(imageData){$.ajax({ url: 'http://localhost:8080/LSWS/ws/ocr/getWeb ...
- RSA加密原理使用方式签名验证
RSA加密原理使用方式签名验证 加密是网络传输中非常重要的一环,它保证了信息的安全性,让他人无法通过抓包来获取通讯的信息也无法通过伪造信息而实现对系统的入侵.其中最为常用的信息传递加密方式就是RS ...