Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 478605 - Review Request: arpcheck - Ethernet Layer 2 checking tool
Summary: Review Request: arpcheck - Ethernet Layer 2 checking tool
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Christoph Wickert
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: FE-DEADREVIEW
TreeView+ depends on / blocked
 
Reported: 2009-01-01 23:35 UTC by Fabian Affolter
Modified: 2009-09-18 10:04 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-04-06 15:01:52 UTC


Attachments (Terms of Use)

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


Note You need to log in before you can comment on or make changes to this bug.