≡ Menu

Linux: sysctl command to see Martians Packets status

Fig. 01: Find out if suspicious packets are logged or not on Linux

To find out if suspicious packets are logged or not on Linux, type:

sysctl -a | grep martians

Sample outputs:

net.ipv4.conf.all.log_martians = 0
net.ipv4.conf.default.log_martians = 0
net.ipv4.conf.lo.log_martians = 0
net.ipv4.conf.eth0.log_martians = 0
net.ipv4.conf.eth1.log_martians = 0

To log martians packets set all above variables to 1 using sysctl command as follows:

sysctl -w net.ipv4.conf.all.log_martians=1
sysctl -w net.ipv4.conf.default.log_martians=1

Sysadmin because even developers need heroes!!!

Share this tutorial on:

Examples and usage: Linux: Log Suspicious Martian Packets / Un-routable Source Addresses

{ 0 comments… add one }
Security: Are you a robot or human?
You can use these HTML tags and attributes: <strong> <em> <pre> <code> <a href="" title="">


   Tagged with: