Bug 478605

Summary: Review Request: arpcheck - Ethernet Layer 2 checking tool
Product: [Fedora] Fedora Reporter: Fabian Affolter <mail>
Component: Package ReviewAssignee: Christoph Wickert <christoph.wickert>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: christoph.wickert, fedora-package-review, notting
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-04-06 15:01:52 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 201449    

Description Fabian Affolter 2009-01-01 23:35:14 UTC
Spec URL: http://fab.fedorapeople.org/packages/SRPMS/arpcheck.spec
SRPM URL: http://fab.fedorapeople.org/packages/SRPMS/arpcheck-1.8-1.fc9.src.rpm

Project URL: http://ge.mine.nu/arpcheck.html

Description:
arpcheck checks /proc/net/arp for MAC/IP combinations and compares them
to a static or dynamic MAC list. If something does not fit, you'll get
an alarm which will also be logged. You can also run custom scripts.

This is useful, if you're a router with multiple interfaces (e.g. WAN, 
LAN, DMZ) and want to check if anyone from your clients is evil and does
some arpspoofing (mitm) or changes his IP.

Koji scratch build:
http://koji.fedoraproject.org/koji/taskinfo?taskID=1028979

rpmlint output:
[fab@laptop024 noarch]$ rpmlint arpcheck-1.8-1.fc9.noarch.rpm 
arpcheck.noarch: W: no-documentation
1 packages and 0 specfiles checked; 0 errors, 1 warnings.

[fab@laptop024 SRPMS]$ rpmlint arpcheck-1.8-1.fc9.src.rpm 
1 packages and 0 specfiles checked; 0 errors, 0 warnings.

Comment 1 Christoph Wickert 2009-01-03 16:35:52 UTC
The scrip itself is nice, but having the config inside the script itself is really bad. In the current state this should not be packaged as rpm.

How about moving the the basic config to lets say /etc/arpcheck.conf, /etc/archeck/arpreck.conf or /etc/sysconfig/arpcheck and modify the script a little?


############# CONFIGURATION ####################################################
### ONLY CHANGE IN /etc/sysconfig/arpcheck !!!

if [ ! -f /etc/sysconfig/arpcheck ]; then
    echo "Configuration file /etc/sysconfig/arpckeck not found."
    echo "Please copy /usr/share/doc/arpcheck-1.8-1/arpcheck.conf.default"
    echo "to /etc/sysconfig/arpckeck and edit it for your needs."
    exit 1
fi

. /etc/sysconfig/arpcheck

### End of basic config


Issues:
- Default config is not sane: Defaults for dMACLIST, BLACKLIST and WHITELIST are not same. If the script is executed with root privileges somewhere is accidentially creates files that are left behind because they are not owned by the package
- Log path requires root privileges
- No documentation except in the script itself. Include a README with some of the info from the header of the script

Ideas: 
- Allow per user config ~/.arpcheck.conf
- Include a template for the configuration instead of providing the config file automatically to make sure the user edits the file before usage. Something like

if [ ! -f /etc/sysconfig/arpcheck ]; then
    echo "Please copy /usr/share/doc/arpcheck-1.8-1/arpcheck.conf.default"
    echo "to /etc/sysconfig/arpckeck and edit it for your needs."
    exit 1
fi

- Include a README.FFEDORA for distro specific changes
- Install to /usr/sbin if this is only meant to be run as root

Comment 2 Fabian Affolter 2009-01-11 09:43:30 UTC
Thanks Christoph, very good points.  From my point of view all this points should be implemented by upstream.  I will get in touch with those guys and ask them to incorporate your ideas.

Comment 3 Fabian Affolter 2009-03-07 14:36:36 UTC
Sent again a message to upstream.

Comment 4 Fabian Affolter 2009-04-06 15:01:52 UTC
Upstream is still working on 2.0.  I will close this review for now and reopen a new one as soon as arpcheck 2.0 is available.

Comment 5 Fabian Affolter 2009-09-18 07:38:41 UTC
2.0 is still not available