因为安装环境的时候没有安装iptables-service服务,因此只用在现有的策略的基础上,添加
iptables -A INPUT -i ens192 -p icmp -m icmp --icmp-type 8 -j DROP
执行了以上命令,就是禁止其他主机来ping该主机
CVE-1999-0524漏洞处理
iptables -A INPUT -p ICMP --icmp-type timestamp-request -j DROP
iptables -A INPUT -p ICMP --icmp-type timestamp-reply -j DROP
iptables -A OUTPUT -p ICMP --icmp-type timestamp-request -j DROP
iptables -A OUTPUT -p ICMP --icmp-type timestamp-reply -j DROP
执行了以上命令是处理CVE-1999-0524
CVE-1999-0633
iptables -A INPUT -p ICMP --icmp-type echo-reply -j DROP
iptables -A INPUT -p ICMP --icmp-type time-exceeded -j DROP
iptables -A INPUT -p ICMP --icmp-type destination-unreachable -j DROP
iptables -A OUTPUT -p ICMP --icmp-type echo-reply -j DROP
iptables -A OUTPUT -p ICMP --icmp-type time-exceeded -j DROP
iptables -A OUTPUT -p ICMP --icmp-type destination-unreachable -j DROP
执行了以上命令是处理CVE-1999-0633
其中代码为15、16的信息报文已经作废。
通过Netwox模拟情况:
- 使用netwox发送请求
- 看到已经返回,如下图所示
- 通过tcpdump从服务器上抓包,导入wareshark如下图所示,有type13,type14,type2的反馈
- 为服务器添加策略后抓包,包中只有type14,没有其余信息,说明策略生效