In this method we are going to use IpTables . make sure its installed ..
Method 2:
run this to disable ping response:
iptables -I INPUT -i ech0 -p icmp -s 0/0 -d 0/0 -j DROP
and this to allow ping response:
iptables -I INPUT -i ech0 -p icmp -s 0/0 -d 0/0 -j ACCEPT
Done !!