LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   How to Block ping into my m/c ?? (https://www.linuxquestions.org/questions/linux-networking-3/how-to-block-ping-into-my-m-c-244515/)

emailssent 10-19-2004 03:06 AM

How to Block ping into my m/c ??
 
How can I block ping in my m/c, is there any way to do that.

And is there any way to know who is pinging, who has pinged to m/c ???

Demonbane 10-19-2004 03:42 AM

2 iptables rules similar to this should do what you need:
Code:

iptables -I INPUT -m limit -p icmp --icmp-type echo-request -j LOG --log-prefix="ping..."

iptables -I INPUT -p icmp --icmp-type echo-request -j DROP


mardanian 10-19-2004 04:08 AM

yes im fully agree with Demonbane blocking all pings are not a good idea however...if you wants to DROP all sorta pingy then

iptables -A INPUT -p icmp -j DROP

or here is a kernel hack
echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all

regards

emailssent 10-19-2004 05:47 AM

thanx Demonbane && mardanian


@mardanian
Quote:

blocking all pings are not a good idea however.
Why is it so ?


-jack


All times are GMT -5. The time now is 11:45 PM.