jokob-sk / NetAlertX

🖧🔍 WIFI / LAN intruder detector. Scans for devices connected to your network and alerts you if new and unknown devices are found.
GNU General Public License v3.0
2.97k stars 178 forks source link

A way to select which subnets to add to the scan (Mikrotik plugin) #836

Closed stanelie closed 1 week ago

stanelie commented 1 week ago

Hello.

My Mikrotik router is managing 8 networks, but I only care to scan for 2 of them. So, I would like to exclude them from the scan results (Mikrotik plugin). They are on distinct subnets.

Example : I would like to exclude the building's Guests network, so I don't get alerts every time someone on the sidewalk connects to it.

It would be useful to me to have a way to exclude certain subnets, or, to have a way to choose which subnets I would like to include in the scan.

Thanks!

jokob-sk commented 1 week ago

Hi @stanelie,

I won't be implementing plugin specific exclusions as that would overcomplicate the code and thus maintenance (e.. G. That exclusion settings would have to be configurable across all scanner plugins)

However I think that you should be able to exclude devices with the already available settings. Please check these docs for details: https://github.com/jokob-sk/NetAlertX/blob/main/docs/NOTIFICATIONS.md

Let me know your thoughts. J

jokob-sk commented 1 week ago

Also, please use the feature template in the future as it allows me to understand what you tried, though of and the use case. I'm not sure for example if you have considered above.

Templates help me not to get burned out of maintaining this project as they reduce the back and forth communication, so that I can focus my time better.

Thanks in advance.

stanelie commented 1 week ago

Oh! Ignored IPs from the New Devices section is the feature I was looking for.

However, after deleting all my devices and having the Mikrotik plugin re-add them, those that I excluded with the filter "10.10.%.%", as per the documentation, were still added to the list of devices (I want to not add all the 10.10.x.x devices).

Sorry about the template, I will be more careful. Thanks!

jokob-sk commented 1 week ago

Nah, all good.

I think the value should then be 10.10.%. Let me know if that works.

Thanks, J

stanelie commented 1 week ago

I've tried with both 10.10.%. and 10.10.% , and I still get devices added in the 10.10.x.x range.

Thoughts?

jokob-sk commented 1 week ago

Hi @stanelie ,

I think I found the issue. The correct value should be 10.10.% - without the . at the end.

This should be fixed in the next release. It would be great if you could test this. Can you please switch to the netalertx-dev docker image (backup everything at first), in about 15 minutes (or after the last action finishes) from now.

Thanks in advance, j

stanelie commented 1 week ago

No luck. I still see the excluded subnet in the devices list.

jokob-sk commented 1 week ago

Hi, thanks for checking.

Just to clarify, this will stop the devices being added. However once they are in the app, they will remain seen. IF you delete one of the devices, will it reappear?

stanelie commented 1 week ago

Everytime I test this feature, I previously click on Delete All Devices in the maintenance tools menu.

They still reappear.

Edit: typo

jokob-sk commented 1 week ago

Thanks @stanelie - I think I overlooked one query - weird that no one complained about this before.

Hopefully now this truly works now.

It would be great if you could test this. Can you please switch to the netalertx-dev docker image (backup everything at first), in about 15 minutes (or after the last action finishes) from now.

Thanks in advance, j

stanelie commented 1 week ago

It works! 🎉

jokob-sk commented 1 week ago

Yayyyy 🍾 🙂

jokob-sk commented 1 week ago

I will close this as released and solved