Bug 478605 - Review Request: arpcheck - Ethernet Layer 2 checking tool
Review Request: arpcheck - Ethernet Layer 2 checking tool
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Christoph Wickert
Fedora Extras Quality Assurance
:
Depends On:
Blocks: FE-DEADREVIEW
  Show dependency treegraph
 
Reported: 2009-01-01 18:35 EST by Fabian Affolter
Modified: 2009-09-18 06:04 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-04-06 11:01:52 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Fabian Affolter 2009-01-01 18:35:14 EST
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 11:35:52 EST
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 04:43:30 EST
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 09:36:36 EST
Sent again a message to upstream.
Comment 4 Fabian Affolter 2009-04-06 11:01:52 EDT
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 03:38:41 EDT
2.0 is still not available

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