Hi guys
Just setting up a simple router (DIR-615 D2) to see how many people connect to it on a daily basis, if I leave it open. Looking through some posts, my options are either DNSMasq or iptables logs. Only thing is, these logs dont seem to be persistent across reboots (I'm guessing this is because its in the /tmp dir?). How would I go about logging all DHCP/MAC requests to a simple "on-board" log file
copy log with cron on a smbshare or use a remote syslog, that receives routers syslog instantly.
Cheers for the reply-I was going down this route with the DNSMasq leases file,and trying to copy the file to something like test1.txt works in the /tmp directory, but then gets scrapped when the device is rebooted/powered off. I tried to put the txt file in somewhere like the /opt or /etc dir but it appears the folder permissions dont allows this. The device will be standalone, with no access to any remote network so smb wont work
I just need to find out somehow an internal directory I can write to away from the /tmp directory!
you could try jffs filesystem, but your device has a too small flash chip. sry, but without usb, smbshare or an remote syslog server ( you need a linux or windows machine ) its not possible. except you copy it manually every day _________________ RT-N66U @ Build 25697M K3.10.63
TL-WR842ND v1 @ BS-build 23919 WDS AP
TL-WR841ND @ BS-build 23919 WDS Client
TL-WR841ND @ BS-build 23919 Client Bridge ( Routed )
Ok
So thanks for the replies-for anybody else who is looking for this, I have found a way to do it.Its a bit of a hack, and not perfect, but should do the trick.
I found if I went to Service tab, and ticked " Use NVRAM for client lease DB ", when the device is rebooted, the clients who have previously connected are still in the list which can be found at the Status/LAN/DHCP clients tab. See attached pic.
If you leave the NVRAM unticked, you lose the previous client list. So once you have your lists, simply cut and paste to notepad/Excel. It probably wont work if you have hundreds , but its a start, if your dealing with a router that has a small footprint of memory/no USB port/no remote connection.
The frustrating thing is, the .db is "in" NVRAM somewhere in the router, but when I telnet it, I cant find it to look at it (when I cd /nvram , it says it cant do it). If anybody knows how, please let me know-as DD-WRT says I'm only using 22k of 64k of NVRAM.
nvram is not in the filesystem, its a RW part of flash unit.
use in telnet: nvram show and it shows you alle the settings.
use nvram show | grep <<a known mac address>>
and it should show you the variable, where your leases are stored. _________________ RT-N66U @ Build 25697M K3.10.63
TL-WR842ND v1 @ BS-build 23919 WDS AP
TL-WR841ND @ BS-build 23919 WDS Client
TL-WR841ND @ BS-build 23919 Client Bridge ( Routed )
nvram is not in the filesystem, its a RW part of flash unit.
use in telnet: nvram show and it shows you alle the settings.
use nvram show | grep <<a known mac address>>
and it should show you the variable, where your leases are stored.
Ahh, top man-thanks
Played about with it and nvram show | grep dnsmasq_lease_ seems to do it as well. Many thanks for the pointer and all the other help
as i said some posts above with remote syslog. read the thread, dont just spam around since days. _________________ RT-N66U @ Build 25697M K3.10.63
TL-WR842ND v1 @ BS-build 23919 WDS AP
TL-WR841ND @ BS-build 23919 WDS Client
TL-WR841ND @ BS-build 23919 Client Bridge ( Routed )
jeah, as i said in post 2. remote syslog, lol you are most noob ever seen. roffel, go away from forum. _________________ RT-N66U @ Build 25697M K3.10.63
TL-WR842ND v1 @ BS-build 23919 WDS AP
TL-WR841ND @ BS-build 23919 WDS Client
TL-WR841ND @ BS-build 23919 Client Bridge ( Routed )