On Wed, 15 Apr 1998, George Toft wrote:

> Any ideas on how to log a ping to my machine
> in the logs, say /var/log/messages ?

You can use tcpdump to log all incoming icmp messages (including pings, as
well as host/network/port unreachable, source quench, redirect, etc.)
which, if you're interested in pings, you might be interested in them too.
I use something like

tcpdump -n -l -p -i eth0 > logfile

which will use non-promiscuous mode (only read your own packets, not all
of them on the network, saves performance), line buffered mode (so you can
redirect the output properly), don't look up DNS entries on packets
(another performance saver, very important), and -i specifies the network
interface (eth0 or ppp0 usually).


-- 
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
http://www.redhat.com/RedHat-FAQ /RedHat-Errata /RedHat-Tips /mailing-lists
         To unsubscribe: mail [EMAIL PROTECTED] with 
                       "unsubscribe" as the Subject.

Reply via email to