LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   DENY ICMP Packets (https://www.linuxquestions.org/questions/linux-software-2/deny-icmp-packets-101866/)

joseph 10-08-2003 08:50 PM

DENY ICMP Packets
 
Dear All,

I want to deny all ping request, how to do that?

iceman47 10-08-2003 10:03 PM

/sbin/iptables -A OUTPUT -p icmp -o eth0 -j ACCEPT
/sbin/iptables -A INPUT -p icmp --icmp-type echo-reply -s 0/0 -i eth0 -j ACCEPT
/sbin/iptables -A INPUT -p icmp --icmp-type destination-unreachable -s 0/0 -i eth0 -j ACCEPT
/sbin/iptables -A INPUT -p icmp --icmp-type time-exceeded -s 0/0 -i eth0 -j ACCEPT
/sbin/iptables -A INPUT -p icmp -i eth0 -j DROP

this makes that outgoing pings are allowed, but incoming not.
integrate these lines in your iptables script


All times are GMT -5. The time now is 01:11 AM.