lsleases helps you to find dynamic assigned ip addresses from any devices in your local network.
This package contains two executables:
lsleases displays captured ip addresses.
See the lsleaes man page for more information.
lsleasesd captures broadcast ‘DHCP request’ datagrams.
See the lsleasesd man page for more information.
You can clone this repository and build the binaries yourself, or use the go command to download and build it.
When you build this project yourself, it’s mandatory to set the necessary capabilities or use sudo when you start lsleasesd.
You can set the necessary capabilities per sudo setcap cap_net_raw,cap_net_bind_services=+ep lsleasesd
.
In the checkout directory execute:
go build ./cmd/lsleases
go build ./cmd/lsleasesd
go get -u github.com/j-keck/lsleases/cmd/lsleases
go get -u github.com/j-keck/lsleases/cmd/lsleasesd
This installs lsleases (the client) and lsleasesd (the server) under $GOPATH/bin
.
├── build : build scripts ├── cmd │ ├── lsleases : client programm │ └── lsleasesd : daemon programm ├── docs : documentation ├── examples : go library examples └── pkg : modules ├── config : configuration ├── cscom : client server communication ├── daemon : daemon (lsleasesd) ├── leases : leases, history, cleanup ├── sniffer : network sniffer └── webui : web app
lsleases opens a network socket to captures broadcast ‘DHCP request’ datagrams.
If you have a firewall which blocks all incomming traffic, lsleases can’t capture any packages.
To temporary allow incomming traffic on port 67 (DHCP) execute the following command.
sudo iptables -I INPUT -p udp --dport 67 -j ACCEPT
TOOD: describe how make the firewall rule persistent.