{"id":13582138,"url":"https://github.com/j-keck/lsleases","last_synced_at":"2026-03-11T18:05:03.307Z","repository":{"id":17536586,"uuid":"20339233","full_name":"j-keck/lsleases","owner":"j-keck","description":"list assigned ip from any device in your network","archived":false,"fork":false,"pushed_at":"2020-08-08T09:04:06.000Z","size":414,"stargazers_count":96,"open_issues_count":0,"forks_count":12,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-11-05T22:39:55.112Z","etag":null,"topics":["dhcp","dhcp-request","dhcp-sniffer","ip","leases"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/j-keck.png","metadata":{"files":{"readme":"README.org","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-30T18:57:01.000Z","updated_at":"2024-06-11T21:52:42.000Z","dependencies_parsed_at":"2022-09-10T17:30:59.549Z","dependency_job_id":null,"html_url":"https://github.com/j-keck/lsleases","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j-keck%2Flsleases","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j-keck%2Flsleases/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j-keck%2Flsleases/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j-keck%2Flsleases/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/j-keck","download_url":"https://codeload.github.com/j-keck/lsleases/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247488859,"owners_count":20947015,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dhcp","dhcp-request","dhcp-sniffer","ip","leases"],"created_at":"2024-08-01T15:02:26.942Z","updated_at":"2025-12-16T00:12:07.824Z","avatar_url":"https://github.com/j-keck.png","language":"Go","funding_links":[],"categories":["Go","DHCP"],"sub_categories":[],"readme":"* lsleases - list dynamic assigned ip addresses in your network\n\n*lsleases* captures broadcast 'DHCP request' datagrams from any device \\\\\n(pc, laptop, virtual machine, phone, raspberry, esp32, ...)\nwith dynamic ip addresses in your local network.\n\nYou can list the captured ip addresses to lookup an assigned ip for a device.\n\n/For more information, check the [[docs/manual.org][Manual]]./\n\n* Usage\n\n1.) install *lsleases* - see [[#installation][Installation]]\n\n2.) re-plug / start-up any device with a dynamic ip address\n\n3a.) list captured devices\n\n#+BEGIN_EXAMPLE\nj@main:~ ⟩ lsleases\nIp               Mac                Host\n192.168.1.152    80:d0:9b:xx:xx:xx  android-6298296f6184995a\n192.168.1.122    b8:27:eb:xx:xx:xx  raspberrypi\n192.168.1.155    5c:cf:7f:xx:xx:xx  NODE-931BFD\n#+END_EXAMPLE\n\n3b.) or if you start *lsleasesd* with the '-webui' option, you can open your browser at http://127.0.0.1:9999\nto access the integrated webapp.\n\n[[./docs/webui-screenshot.png]]\n\n\n/You can use lsleases as a go library in your own programs: [[#lsleases-go-library][lsleases go library]]/\n\n* Installation\n\n/I will provide standalone binaries for each platform in the coming days./\n\n*!* If no leases are captured, make sure your firewall has port 67 (DHCP) open *!*\n\n#+BEGIN_SRC shell :eval no\nsudo iptables -I INPUT -p udp --dport 67 -j ACCEPT\n#+END_SRC\n\ncheck the [[docs/manual.org][Manual]] for a description.\n\n  - [[#debian--ubuntu][Debian / Ubuntu]]\n  - [[#redhat--fedora][Redhat / Fedora]]\n  - [[#windows][Windows]]\n  - [[#osx][OSX]]\n  - [[#freebsd][FreeBSD]]\n  - [[#build-from-source-client--server][Build from source (client / server)]]\n  - [[#build-from-source-standalone][Build from source (standalone)]]\n\n*** Debian / Ubuntu\n\n 1.) download the ~.deb~ package from [[http://github.com/j-keck/lsleases/releases/latest]]\n\n 2.) install the package ~sudo dpkg -i lsleases-\u003cVERSION\u003e-\u003cARCH\u003e.deb~\n\n 3.) activate the service ~sudo systemctl enable lsleasesd~\n\n 4.) start the daemon ~sudo systemctl start lsleasesd~\n\n\n\n*** RedHat / Fedora\n\n 1.) download the ~.rpm~ package from [[http://github.com/j-keck/lsleases/releases/latest]]\n\n 2.) install the package ~sudo rpm -i lsleases-\u003cVERSION\u003e-\u003cARCH\u003e.rpm~\n\n 3.) activate the service ~sudo systemctl enable lsleasesd~\n\n 4.) start the daemon ~sudo systemctl start lsleasesd~\n\n\n*** Windows\n\nI provide two packages for windows:\n\n  - ~lsleases-\u003cVERSION\u003e-\u003cARCH\u003e-windows-installer.exe~\n  - ~lsleases-\u003cVERSION\u003e-\u003cARCH\u003e-windows-standalone.zip~\n\ncheck [[docs/manual-windows.org][Windows Manual]] for more information.\n\n 1.) download the package from [[http://github.com/j-keck/lsleases/releases/latest]]\n\n 2.) install per installer or unzip the standalone package\n\n\n*** OSX\n\n 1.) download the ~lsleases-\u003cVERSION\u003e-\u003cARCH\u003e-osx-standalone.zip~ package from [[http://github.com/j-keck/lsleases/releases/latest]]\n\n 2.) unpack the zip archive and go into the ~lsleases~ directory\n\n 3.) execute ~./capture-leases.sh~\n\n\n*** FreeBSD\n\n 1.) download the ~lsleases-\u003cVERSION\u003e-amd64-freebsd.txz~ package from [[http://github.com/j-keck/lsleases/releases/latest]]\n\n 2.) install the package ~sudo pkg install lsleases-\u003cVERSION\u003e-amd64-freebsd.txz~\n\n 3.) allow unprivileged users open ports less than 1024 (*lsleasesd* runs as user _nobody_)\n#+BEGIN_SRC shell :eval no\necho net.inet.ip.portrange.reservedhigh=0 | sudo tee -a /etc/sysctl.conf\nsudo service sysctl restart\n#+END_SRC\n\n 4.) activate the service ~sudo sysrc lsleasesd_enable=YES~\n\n 5.) start the daemon ~sudo service lsleasesd start~\n\n\n*** Build from source (client / server)\n\n   1.) fetch the server\n  #+BEGIN_SRC shell :eval no\n  go get -u github.com/j-keck/lsleases/cmd/lsleasesd\n  #+END_SRC\n\n   2.) start the server\n  #+BEGIN_SRC shell :eval no\n  sudo $GOPATH/bin/lsleasesd \u0026\n  #+END_SRC\n\n   3.) fetch the client\n  #+BEGIN_SRC shell :eval no\n  go get -u github.com/j-keck/lsleases/cmd/lsleases\n  #+END_SRC\n\n   4.) run the client\n  #+BEGIN_SRC shell :eval no\n  $GOPATH/bin/lsleases -w\n  #+END_SRC\n\n  see the [[/docs/manual.org#build-from-source][Manual]] for more information.\n\n*** Build from source (standalone)\n\nFor a quick test you can use the standalone mode without the server component.\nIn this mode it does not run in the background, has no cache and supports no webui.\n\n 1.) fetch the client\n#+BEGIN_SRC shell :eval no\ngo get -u github.com/j-keck/lsleases/cmd/lsleases\n#+END_SRC\n\n 2.) run the client in the standalone mode\n#+BEGIN_SRC shell :eval no\nsudo $GOPATH/bin/lsleases -s\n#+END_SRC\n\nsee the [[/docs/manual.org#build-from-source][Manual]] for more information.\n\n* lsleases go library\n\nYou can use *lsleases* as a go library in your own programs.\nFor example to trigger any custom action on device discovery.\n\n#+BEGIN_SRC go :tangle examples/simple-sniffer.go :mkdirp yes :eval no\npackage main\n\nimport \"github.com/j-keck/lsleases/pkg/sniffer\"\nimport \"github.com/j-keck/lsleases/pkg/config\"\nimport \"github.com/j-keck/plog\"\n\nfunc main() {\n  // create a logger instance\n  log := plog.GlobalLogger().Add(plog.NewDefaultConsoleLogger())\n\n  // create the sniffer with the default configuration\n  cfg := config.NewDefaultConfig()\n  sniffer := sniffer.NewSniffer(cfg)\n\n  // subscribe to DHCP leases events and log the events\n  go func() {\n    leasesC := sniffer.Subscribe(10)\n    for {\n      lease := \u003c-leasesC\n      log.Infof(\"new lease: %s\", lease.String())\n    }\n  }()\n\n  if err := sniffer.Start(); err == nil {\n    log.Info(\"sniffing ... - hit \u003cCTRL-C\u003e to abort -\")\n    select {}\n  } else {\n    panic(err)\n  }\n}\n#+END_SRC\n\n#+BEGIN_SRC shell :eval no\nGO111MODULE=on sudo go run examples/simple-sniffer.go\n#+END_SRC\n\n\n* Changelog\n\nsee [[docs/changelog.org][Changelog]]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj-keck%2Flsleases","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fj-keck%2Flsleases","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj-keck%2Flsleases/lists"}