LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-28-2006, 05:04 PM   #1
s0n|k
Member
 
Registered: Feb 2006
Distribution: RHEL4
Posts: 80

Rep: Reputation: 15
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.
 
Old 10-30-2006, 01:23 AM   #2
Freemor
Member
 
Registered: Aug 2005
Location: New Brunswick
Distribution: Trisquel
Posts: 70
Blog Entries: 8

Rep: Reputation: 15
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Deleted /var/log/messages, can't log any files-iptables chingyenccy Linux - Newbie 7 02-27-2005 04:03 PM
iptables log don_wombat Linux - Software 1 01-25-2005 06:45 PM
IPtables log muru_enom Linux - Security 1 11-26-2003 09:31 AM
IPtables Log Analyzer from http://www.gege.org/iptables/ brainlego Linux - Software 0 08-11-2003 06:08 AM
iptables, changing log file from /var/log/messages acid2000 Linux - Networking 3 03-11-2003 08:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:07 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration