6.5

Table Of Contents
Configure the Host System to Log IPv4 Martian Packets
As a security best practice, verify that the host system logs IPv4 Martian packets. Martian packets contain
addresses that the system knows to be invalid. Congure the host system to log the messages so that you
can identify miscongurations or aacks in progress.
Procedure
1 Run the # grep [01] /proc/sys/net/ipv4/conf/*/log_martians|egrep "default|all" command to
check whether the host logs IPv4 Martian packets.
2 Congure the host system to log IPv4 Martian packets.
a Open the /etc/sysctl.conf le to congure the host system.
b If the values are not set to 1, add the following entries to the le or update the existing entries
accordingly. Set the value to 1.
net.ipv4.conf.all.log_martians=1
net.ipv4.conf.default.log_martians=1
c Save the changes and close the le.
Configure the Host System to use IPv4 Reverse Path Filtering
As a security best practice, congure your host machines to use IPv4 reverse path ltering. Reverse path
ltering protects against spoofed source addresses by causing the system to discard packets with source
addresses that have no route or if the route does not point towards the originating interface.
Congure your system to use reverse-path ltering whenever possible. Depending on the system role,
reverse-path ltering might cause legitimate trac to be discarded. In such cases, you might need to use a
more permissive mode or disable reverse-path ltering altogether.
Procedure
1 Run the # grep [01] /proc/sys/net/ipv4/conf/*/rp_filter|egrep "default|all" command on the
host system to check whether the system uses IPv4 reverse path ltering.
2 Congure the host system to use IPv4 reverse path ltering.
a Open the /etc/sysctl.conf le to congure the host system.
b If the values are not set to 1, add the following entries to the le or update the existing entries
accordingly. Set the value to 1.
net.ipv4.conf.all.rp_filter=1
net.ipv4.conf.default.rp_filter=1
c Save the changes and close the le.
Configure the Host System to Deny IPv4 Forwarding
As a security best practice, verify that the host system denies IPv4 forwarding. If the system is congured
for IP forwarding and is not a designated router, it could be used to bypass network security by providing a
path for communication that is not ltered by network devices.
Procedure
1 Run the # cat /proc/sys/net/ipv4/ip_forward command to verify whether the host denies IPv4
forwarding.
Secure Configuration
44 VMware, Inc.