blob: eb992b89d1a2243627cd12f39ee65fc9efc61c3c [file] [log] [blame]
Dmitry Teselkinaf730f92018-08-16 11:29:55 +03001# 3.2.2 Ensure ICMP redirects are not accepted
2#
3# Description
4# ===========
5# ICMP redirect messages are packets that convey routing information and tell
6# your host (acting as a router) to send packets via an alternate path. It is
7# a way of allowing an outside routing device to update your system routing
8# tables. By setting net.ipv4.conf.all.accept_redirects to 0, the system will
9# not accept any ICMP redirect messages, and therefore, won't allow outsiders
10# to update the system's routing tables.
11#
12# Rationale
13# =========
14# Attackers could use bogus ICMP redirect messages to maliciously alter the
15# system routing tables and get them to send packets to incorrect networks and
16# allow your system packets to be captured.
17#
18# Audit
19# =====
20#
21# Run the following commands and verify output matches:
22#
23# # sysctl net.ipv4.conf.all.accept_redirects
24# net.ipv4.conf.all.accept_redirects = 0
25# # sysctl net.ipv4.conf.default.accept_redirects
26# net.ipv4.conf.default.accept_redirects = 0
27#
28# Remediation
29# ===========
30#
31# Set the following parameters in the /etc/sysctl.conf file:
32#
33# net.ipv4.conf.all.accept_redirects = 0
34# net.ipv4.conf.default.accept_redirects = 0
35#
36# Run the following commands to set the active kernel parameters:
37#
38# # sysctl -w net.ipv4.conf.all.accept_redirects=0
39# # sysctl -w net.ipv4.conf.default.accept_redirects=0
40# # sysctl -w net.ipv4.route.flush=1
41
42parameters:
43 linux:
44 system:
45 kernel:
46 sysctl:
47 net.ipv4.conf.all.accept_redirects: 0
48 net.ipv4.conf.default.accept_redirects: 0