# Reverse path filtering - drop packets with spoofed source IPs net.ipv4.conf.all.rp_filter = 1 net.ipv4.conf.default.rp_filter = 1 # Don't send ICMP redirects (not a router) net.ipv4.conf.all.send_redirects = 0 net.ipv4.conf.default.send_redirects = 0 # Don't accept ICMP redirects 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 # Don't accept source-routed packets net.ipv4.conf.all.accept_source_route = 0 net.ipv4.conf.default.accept_source_route = 0 # Log martian packets (spoofed, source-routed, redirect) net.ipv4.conf.all.log_martians = 1 net.ipv4.conf.default.log_martians = 1