Open samip5 opened 3 years ago
One option could be for the host to run ssh root@router tail -f /var/log/dhcp.log
to get the logs in realtime. Wouldn't need any installations on the router, except for an ssh key.
One option could be for the host to run
ssh root@router tail -f /var/log/dhcp.log
to get the logs in realtime. Wouldn't need any installations on the router, except for an ssh key.
It seems that the router is not logging the requests at all as in there's no log file for DHCP that shows anything useful. Daemon seems to be dhcpd3, but it can be changed to dnsmasq I think.
dhcpd3 can be given -tf
option to log transactions: http://www.linuxcertif.com/man/8/dhcpd3/
The log via SSH is a viable option but the registration page needs to be on the local LAN (or routable address without NAT such as VPN connection to the site) because it maps IP addresses to MAC addresses. This needs some thinking. It doesn't need to be layer-2 connectivity (Ethernet) because DHCP server log parser actually serves the IP to MAC mapping. The registration page only takes the IP and checks the current mapping from the database.
Most hacklabs probably have a RPi that can be used for a backend/front.
Okay then, a better idea would be to craft a Debian package or docker image for this thing. You could easily run the DHCP server there as well, just turn off the server from Edgerouter.
Okay then, a better idea would be to craft a Debian package or docker image for this thing. You could easily run the DHCP server there as well, just turn off the server from Edgerouter.
Running the DHCP server not on the router is not really a good solution, at least it does not sound like a good option even if it would be easy to do.
Why? It's quite normal and has been commonplace to run DHCP on a separate computer. For example if you have a Microsoft AD server for example.
I'm just thinking about a minimum viable product, because it's more easy to turn off DHCP on a router than to give dozends of installation instructions and packages to all kinds of embedded routers out there.
Why? It's quite normal and has been commonplace to run DHCP on a separate computer. For example if you have a Microsoft AD server for example. I'm just thinking about a minimum viable product, because it's more easy to turn off DHCP on a router than to give dozends of installation instructions and packages to all kinds of embedded routers out there.
The point of this ticket is to support non-server router, which that wouldn't be.
Currently this will not work on an EdgeRouter-X, due to the small flash on-board and RAM limitations. Systemd journal is also not being used. Python agent to send logs with to an backend should be done.