.\" @(#) $Id: arpwatch.8,v 1.13 2000/10/08 20:31:25 leres Exp $ (LBL) .\" .\" Copyright (c) 1992, 1994, 1996, 1997, 2000 .\" The Regents of the University of California. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that: (1) source code distributions .\" retain the above copyright notice and this paragraph in its entirety, (2) .\" distributions including binary code include the above copyright notice and .\" this paragraph in its entirety in the documentation or other materials .\" provided with the distribution, and (3) all advertising materials mentioning .\" features or use of this software display the following acknowledgement: .\" ``This product includes software developed by the University of California, .\" Lawrence Berkeley Laboratory and its contributors.'' Neither the name of .\" the University nor the names of its contributors may be used to endorse .\" or promote products derived from this software without specific prior .\" written permission. .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. .\" .TH ARPWATCH 8 "8 October 2000" .UC 4 .SH NAME arpwatch \- keep track of ethernet/ip address pairings .SH SYNOPSIS .na .B arpwatch .\" ** .\" ** [ .B \-dN ] .\" ** .\" ** .br .ti +8 [ .B \-f .I datafile ] .\" ** .\" ** .br .ti +8 [ .B \-i .I interface ] .\" ** .\" ** .br .ti +8 [ .B -n .IR net [/ width ]] .\" ** .\" ** .br .ti +8 [ .B \-r .I file ] .\" ** .\" ** .br .ti +8 [ .B -F .I filter ] .\" ** .\" ** .br .ti +8 [ .B -s .I sendmail_path ] .\" ** .\" ** .br .ti +8 [ .B -p ] .\" ** .\" ** .br .ti +8 [ .B -a ] .\" ** .\" ** .br .ti +8 [ .B \-m .I addr ] .\" ** .\" ** .br .ti +8 [ .B -u .I username ] .\" ** .\" ** .br .ti +8 [ .B -Q ] .\" ** .\" ** .br .ti +8 [ .B -z .I ignorenet/ignoremask ] .\" ** .\" ** .ad .SH DESCRIPTION .B Arpwatch keeps track for ethernet/ip address pairings. It syslogs activity and reports certain changes via email. .B Arpwatch uses .BR pcap (3) to listen for arp packets on a local ethernet interface. .\" ** .\" ** .LP The .B \-d flag is used enable debugging. This also inhibits forking into the background and emailing the reports. Instead, they are sent to .IR stderr . .\" ** .\" ** .LP The .B \-f flag is used to set the ethernet/ip address database filename. The default is .IR arp.dat . .\" ** .\" ** .LP The .B \-i flag is used to override the default interface. .\" ** .\" ** .LP The .B \-n flag specifies additional local networks. This can be useful to avoid "bogon" warnings when there is more than one network running on the same wire. If the optional .I width is not specified, the default netmask for the network's class is used. .\" ** .\" ** .LP The .B \-N flag disables reporting any bogons. .\" ** .\" ** .LP The .B \-r flag is used to specify a savefile (perhaps created by .BR tcpdump (1) or .BR pcapture (1)) to read from instead of reading from the network. In this case, .B arpwatch does not fork. .\" ** .\" ** .LP (Debian) The .B -F option is used to specify a pcap filter, which provides a generic way of ignoring specific packets. The applied pcap filter will be "(arp or rarp) and not vlan and (filter)". See .BR pcap-filter (7) for the syntax of that string. .\" ** .\" ** .LP (Debian) The .B -s flag is used to specify the path to the sendmail program. Any program that takes the option \-odi and then text from stdin can be substituted. This is useful for redirecting reports to log files instead of mail. .\" ** .\" ** .LP (Debian) The .B -p flag disables promiscuous operation. ARP broadcasts get through hubs without having the interface in promiscuous mode, while saving considerable resources that would be wasted on processing gigabytes of non-broadcast traffic. OTOH, setting promiscuous mode does not mean getting 100% traffic that would concern .B arpwatch . YMMV. .\" ** .\" ** .LP (Debian) .B -a By default, .B arpwatch only logs bogons but otherwise ignores them. If this option is specified, .B arpwatch will perform normal processing with bogon packets and send reports about detected events. This option can be combined with .B -N to disable the report of the packet being a bogon (processing will still be done). .\" ** .\" ** .LP (Debian) The .B \-m option is used to specify the e-mail address to which reports will be sent. By default, reports are sent to .I root on the local machine. .\" ** .\" ** .LP (Debian) The .B -u flag instructs .B arpwatch to drop root privileges and change the UID to .I username and GID to the primary group of .I username . This is recommended for security reasons, but .I username has to have write access to the default directory. .\" ** .\" ** .LP (Debian) The .B -Q flags prevents arpwatch from sending reports by mail. .\" ** .\" ** .LP (Debian) The .B -z option is used to set a range of ip addresses to ignore (such as a DHCP range). Both the ignorenet and the ignoremask are specified in numbers-and-dots notation and separated from each other by a slash (/). Specifying the ignoremask by subnet length is not supported. If the ignoremask is omitted, 255.255.255.255 is assumed. Example: -z 192.168.10.0/255.255.255.0 .\" ** .\" ** .LP Note that an empty .I arp.dat file must be created before the first time you run .BR arpwatch . .\" ** .\" ** .LP .SH "REPORT MESSAGES" Here's a quick list of the report messages generated by .BR arpwatch (1) (and .BR arpsnmp (1)): .TP .B "new activity" This ethernet/ip address pair has been used for the first time six months or more. .TP .B "new station" The ethernet address has not been seen before. .TP .B "flip flop" The ethernet address has changed from the most recently seen address to the second most recently seen address. (If either the old or new ethernet address is a DECnet address and it is less than 24 hours, the email version of the report is suppressed.) .TP .B "changed ethernet address" The host switched to a new ethernet address. .SH "SYSLOG MESSAGES" Here are some of the syslog messages; note that messages that are reported are also sysloged. .TP .B "ethernet broadcast" The mac ethernet address of the host is a broadcast address. .TP .B "ip broadcast" The ip address of the host is a broadcast address. .TP .B "bogon" The source ip address is not local to the local subnet. .TP .B "ethernet broadcast" The source mac or arp ethernet address was all ones or all zeros. .TP .B "ethernet mismatch" The source mac ethernet address didn't match the address inside the arp packet. .TP .B "reused old ethernet address" The ethernet address has changed from the most recently seen address to the third (or greater) least recently seen address. (This is similar to a flip flop.) .TP .B "suppressed DECnet flip flop" A "flip flop" report was suppressed because one of the two addresses was a DECnet address. .SH FILES .na .nh .nf /var/lib/arpwatch - default directory IFNAME.dat - ethernet/ip address database observed on interface IFNAME ethercodes.db - vendor ethernet block list .ad .hy .fi .SH "SEE ALSO" .na .nh .BR arpsnmp (8), .BR arp (8), .BR bpf (4), .BR tcpdump (1), .BR pcapture (1), .BR pcap (3) .ad .hy .SH AUTHORS Craig Leres of the Lawrence Berkeley National Laboratory Network Research Group, University of California, Berkeley, CA. .LP The current version is available via anonymous ftp: .LP .RS .I ftp://ftp.ee.lbl.gov/arpwatch.tar.gz .RE .SH BUGS Please send bug reports to arpwatch@ee.lbl.gov. .LP Attempts are made to suppress DECnet flip flops but they aren't always successful. .LP Most error messages are posted using syslog.