Pi.Alert icon indicating copy to clipboard operation
Pi.Alert copied to clipboard

Issue with scanning 2 subnets

Open Ahzrukhal112 opened this issue 2 years ago • 6 comments

PI.Alert runs fine when using the '- - localnet' option of scan subnets, this is on my wired network. However when I try to change and scan both my wired and wireless subnets im getting an error as below. Is there a way to change the config to allow it to scan right up to the 255 host?

Scanning... arp-scan Method... WARNING: Cannot open MAC/Vendor file /usr/share/arp-scan/ieee-oui.txt: No such file or directory WARNING: Cannot open MAC/Vendor file /usr/share/arp-scan/ieee-iab.txt: No such file or directory ERROR: Number of bits in 172.30.128.1/255 must be between 3 and 32 Traceback (most recent call last): File "/home/admin/pialert/back/pialert.py", line 1488, in sys.exit(main())
File "/home/admin/pialert/back/pialert.py", line 85, in main res = scan_network() File "/home/admin/pialert/back/pialert.py", line 361, in scan_network arpscan_devices = execute_arpscan (arpscan_retries) File "/home/admin/pialert/back/pialert.py", line 463, in execute_arpscan arpscan_output = subprocess.check_output (arpscan_args, universal_newlines=True) File "/usr/lib/python3.9/subprocess.py", line 424, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "/usr/lib/python3.9/subprocess.py", line 528, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['sudo', 'arp-scan', '--ignoredups', '--retry=9', '172.30.128.1/255', '172.30.129.1/255']' returned non-zero exit status 1.

Ahzrukhal112 avatar Jun 12 '23 10:06 Ahzrukhal112

Please look on a page like https://en.m.wikipedia.org/wiki/Subnetwork how you have to write your configured subnet in the /-notation. There is no /255 network.

Maybe you mean a /24 network which has the subnet mask 255.255.255.0.

I recommend you, if you want further support for Pi.Alert, to switch to one of the active developed forks, because this main project is not maintained for more than 2 years.

leiweibau avatar Jun 12 '23 20:06 leiweibau

Yes I think i do, after changing to '172.30.128.0/24 172.30.129.0/24' It seems to scan again, however only on the wired network. The 128.0 subnet is wired and the 129.0 subnet is wireless, and it doesnt error while scanning but isnt picking up any Wifi connected devices. Ill pose this question on one of the active forks if required. Thanks

Ahzrukhal112 avatar Jun 19 '23 09:06 Ahzrukhal112

If you would use my fork, you could read on the help/FAQ page that if you use multiple interfaces (WLAN, cable), you have to specify them in the configuration as well.

‘172.30.128.0/24 --interface=eth0, 172.30.129.0/24 --interface=wlan0’

The interface name depends on your configuration. I hope I could help you with my information.

Please understand that I will not give extensive support for the main project, as this is not my job. Because of the good will, I'm only willing to solve minor problems here.

leiweibau avatar Jun 19 '23 11:06 leiweibau

How about 172.30.0.0/16 --interface=eth0 ? this kind configuration work or not ?

If from eth0 can ping 172.30.0.0/16 whole network no problem, does Pi.Alert can also scan whole 172.30.0.0/16 network ?

P.S. Such like Windows software Advanced IP Scanner can scan /16 whole network no problem, but look like Pi.Alert can't ?

tarocjsu avatar Jan 31 '24 09:01 tarocjsu

As I understand - it increases the time to scan the network. You can increase the time between scans (in @leiweibau's fork I think via a cron change and in my fork via a setting (notice the Schedule setting on this page))

jokob-sk avatar Jan 31 '24 21:01 jokob-sk

As I understand - it increases the time to scan the network. You can increase the time between scans (in @leiweibau's fork I think via a cron change and in my fork via a setting (notice the Schedule setting on this page))

Thanks for your reply, I will arrange a time to check it.

tarocjsu avatar Feb 22 '24 09:02 tarocjsu