leiweibau/Pi.Alert

[Multi-VLAN scanning]

Closed this issue · 8 comments

It would be very nice to be able to scan across multiple VLANS by specifying the IP ranges (such as 192.168.0.0/16).

Currently, it appears to only scan the /24 of the network it is installed on.

Pi.Alert can scan all networks to which it is connected via a physical or virtual network card.

['192.168.1.0/24 --interface=eth0','192.168.2.0/24 --interface=eth1']
The last configuration is necessary if several networks are to be monitored. 
For each network to be monitored, a corresponding network card must be configured.
This is necessary because the "arp-scan" used is not routed, i.e. it only works within its own subnet. 
Each interface is entered here with the corresponding network. 
The interface designation must be adapted to the conditions of the system.

Thanks so much for the reply!
So if I have this running on a trunk'd interface, I should just be able to specify as follows using the same interface?

SCAN_SUBNETS = [ '192.168.1.0/24 --interface=ens18', '192.168.2.0/24 --interface=ens18', '192.168.3.0/24 --interface=ens18' ]

It may be that this also works. I have only tried it a few times in a virtual environment with several interfaces. With the virtual interfaces, I actually had these in mind

SCAN_SUBNETS = [ '192.168.1.0/24 --interface=ens18', '192.168.2.0/24 --interface=ens18:0', '192.168.3.0/24 --interface=ens18:1' ]

Ah, so each interface would be assigned to a different VLAN. That makes sense.
Is there by chance a way to scan the different SCAN_SUBNETS definitions via ICMP (iterating over a range of IPs) or is that not currently supported?

Is there by chance a way to scan the different SCAN_SUBNETS definitions via ICMP (iterating over a range of IPs) or is that not currently supported?

Unfortunately not. This option is not available at the moment. I have addressed the difficulty of implementation here.

#271 (comment)

#272 (comment)

#272 (comment)

I was actually able to accomplish this using 1 Pi Alert instance and setting multiple network interfaces on the Proxmox instance that hosts the VM. I then setup each interface to the corresponding VLAN using the /etc/network/interfaces config. This works for me, but I understand it is not a straight forward solution.

dimatx commented

I was actually able to accomplish this using 1 Pi Alert instance and setting multiple network interfaces on the Proxmox instance that hosts the VM. I then setup each interface to the corresponding VLAN using the /etc/network/interfaces config. This works for me, but I understand it is not a straight forward solution.

This helped me as I'm also running Proxmox. Thanks, @dustingrady!

No problem @dimatx, glad it helped someone.