eest / ilsd

IP-last-seen deamon

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This is the IP-last-seen deamon, or ilsd for short.

The goal is to build a database of when a given IP address was last being used on the network.

This is done by listening for ARP request packets and recording the sender IP and MAC together with a timestamp in a SQLite database.

The program has only been tested on OpenBSD and depends on the OpenBSD pledge() system call to restrict what it is allowed to do.

It requires a user called "_ilsd" which can be created in this way:

# useradd -d /var/ilsd -s /sbin/nologin -c "IP last seen daemon" _ilsd
# install -d -m 0755 -o root -g wheel /var/ilsd
# install -d -m 0775 -o root -g _ilsd /var/ilsd/db

The code is heavily influenced by a bunch of external resources:

All shortcomings in the code are my own.

About

IP-last-seen deamon


Languages

Language:C 99.1%Language:Makefile 0.9%