How to block icmp packets on linux

block

Hi !

Maybe you need to block attackers or simply stay safe on your Linux server

I’ve discovered several security fails on my system , one of them was not blocking ICMP packets

So I blocked doing this

1. Edit configuration file on /etc/sysctl.conf

2. Add the following line net.ipv4.icmp_echo_ignore_all = 1

ipblockicmp

now the ICMP traffic is blocked!

also type this command to kernel variable and  drop all the packets
# echo ‘1’> /proc/sys/net/ipv4/icmp_echo_ignore_all

And you are done!

regards, Tony.

Advertisements

One response to “How to block icmp packets on linux

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s