- 数字化系统安全加固技术
- 白婧婧 田康 李博 高尉峰 朱康
- 172字
- 2024-12-12 17:28:30
1.8.3 关闭ICMP重定向
风险分析 如果打开ICMP(Internet Control Message Protocol,互联网控制报文协议)重定向,攻击者可以使用虚假的ICMP重定向消息恶意更改系统路由表,使其将数据包发送到不正确的网络,从而拦截系统数据包。
加固详情 关闭ICMP重定向。
加固步骤 编辑文件/etc/sysctl.conf和/etc/sysctl.d/*,使得文件中包含以下参数。
net.ipv4.conf.all.accept_redirects = 0 net.ipv4.conf.default.accept_redirects = 0 net.ipv6.conf.all.accept_redirects = 0 net.ipv6.conf.default.accept_redirects = 0
执行以下命令。
[root@centos7 ~]# sysctl -w net.ipv4.conf.all.accept_redirects=0 [root@centos7 ~]# sysctl -w net.ipv4.conf.default.accept_redirects=0 [root@centos7 ~]# sysctl -w net.ipv4.route.flush=1 [root@centos7 ~]# sysctl -w net.ipv6.conf.all.accept_redirects=0 [root@centos7 ~]# sysctl -w net.ipv6.conf.default.accept_redirects=0 [root@centos7 ~]# sysctl -w net.ipv6.route.flush=1