-
-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable NMAP prodding to double-check device Status to circumvent arp cache #434
Comments
Hey @zawier-git! What scan methods are you using?
Thanks, |
Hi @zawier-git ! Thanks for the awesome logs & details. This helps a lot. It looks like the plugin that is marking the device as online is ARPSCAN:
I assume it's one of these two devices:
You can try to run arp-scan directly in the container and play around with the parameters, but I can't do much if arp-scan itself is reporting the device as online: sudo arp-scan --ignoredups --retry=6 192.168.1.0/24 --interface eth1 I could implement a special "NMAP prodding" mechanism to double-check if a host really is online in the future. I also checked and apparently, arp-scan uses some kind of cache - try to experiment with this and let me know as I can improve the accuracy of the results later:
Please note that manipulating the ARP cache in this way can have network-wide implications, so be careful when using these commands, especially on production networks. Always ensure that you have the necessary permissions to perform such operations, as they typically require administrative privileges ( Additionally, running |
Thank you @jokob-sk for a detailed instruction.
Another device (10.10.10.22) is currently offline, yet it remains discoverable. Initially, I suspected this anomaly might be due to residual power consumption on the mainboard. This could explain why the 'Shenzhen Century Xinyang Technology Co., Ltd' WiFi dongle was still detectable. Some of my devices are configured to enter low-power modes for energy conservation (to enable Wake-On-LAN functionality). To test this hypothesis, I disconnected the dongle and conducted another test, which yielded the same result. I then unplugged the power cord from the wall socket, and again, the device remained visible. So straight to conclusion - it's pure magic after clearing a cache:) I also considered whether network topology could be a contributing factor. In my setup, I have multiple routers, with each preceding one serving as the WAN interface for the next. This cascading configuration repeats several times, and each router connects to various other devices. One of these routers, specifically a NanoPi R4S running FriendlyWrt (a fork of OpenWrt) with Docker and another instance of Pi.Alert, presented a particular challenge. Another instance of Pi.Alert, located on a different subnet under Proxmox, running under Ubuntu and managed via Portainer, is hidden behind firewalls. While this specific device can establish a connection to the NanoPi, communication in the opposite direction appears to be restricted. It's possible that the complex network topology is causing difficulties, as there may be challenges in establishing and maintaining all required network paths." #I could implement a special "NMAP prodding" mechanism to double-check if a host really is online in the future. A such dubble check is more than welcome! |
Alright, so to sum up - clearing the cache is difficult and even then results are not correct. The only way to accurately discover offline devices is (As far as I know) NMAP prodding (a quick NMAP scan). Agreed? |
Agreed! |
I'm also having this issue. I am using Unifi scan (though I think ARP is also running), and I have a switch that shows up as "online" even though it hasn't been plugged in for months. This switch has never been plugged in since I installed pi.alert, so I'm confused why it shows as online. Let me know if I can be of assistance testing. |
@bwirt I think that's a slightly different issue. The first step is to figure out which scan is reporting the device as online. Try running only one of the plugins to determine that. Also, try downloading the Check how to use the |
Sounds like that's the issue then. I'll try the next version and see if that clears it up. |
Might be solved with #645 - please check and of not will reopen |
That particular device is currently down. But interface shows it's online.
While I do a scan:
Starting Nmap 7.80 ( https://nmap.org ) at 2023-09-12 08:59 UTC Note: Host seems down. If it is really up, but blocking our ping probes, try -Pn Nmap done: 1 IP address (0 hosts up) scanned in 3.06 seconds
In my case I feel like first scan of network just stucks and shows always the same info.
Way I run Pi.Alert on docker is:
docker run -d --network=host \ --name=pialert \ -v /home/zawier/Docker/PiAlert/config:/home/pi/pialert/config \ -v /home/zawier/Docker/PiAlert/db:/home/pi/pialert/db \ -e TZ=Europe/Warsaw \ -e PORT=20211 \ -e HOST_USER_ID=1000 \ -e HOST_USER_GID=1000 \ jokobsk/pi.alert:latest
To be sure I have pulled from docker hub lastes version (which was updated yesterday).
Originally posted by @zawier-git in https://github.com/jokob-sk/Pi.Alert/issues/428#issuecomment-1715340971
The text was updated successfully, but these errors were encountered: