LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   IPTables - Don't log pings (https://www.linuxquestions.org/questions/linux-networking-3/iptables-dont-log-pings-496454/)

s0n|k 10-28-2006 05:04 PM

IPTables - Don't log pings
 
What kind of iptable rule can I implement so that everything is logged besides pings? I want to log all icmp data but not to show ping requests/replies.

Freemor 10-30-2006 01:23 AM

As iptables executes rules top down you'd need something like:

iptables -A INPUT -p icmp --icmp-type 8 -j ACCEPT # let ping through
iptables -A INPUT -p icmp -j LOG --log-prefix="IPTables: [ICMP] " # log all other icmps
iptables -A INPUT -p icmp -j accept # accept them now that we logged them

Hope this gets you headed in the right direction.
Freemor


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