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.63k stars 152 forks source link

Import from Asus routers #624

Open tomerh2001 opened 4 months ago

tomerh2001 commented 4 months ago

Is there an existing issue for this?

Is your feature request related to a problem? Please describe

I want to have my router devices and names sync into netalert

Describe the solution you'd like

I would love if there was a way to connect with the asuswrt or the router's API, my router is XT12

Describe alternatives you've considered

Asus seems fairly alright in regards to features and advanced options for the router, maybe they already have a service on the router that already has support in netalert? And I only need to figure out what and how?

Although that's a big maybe

Anything else?

I just don't want to manage my devices on both the Asus app (where I need proper naimings for my devices when I do anything) and the NetAlert service, which does some things much much better than Asus (like tracking history of devices, finding outliers, aggregating all the info from all plugins etc)

anjota80 commented 4 months ago

I have just tested this and think the functionality is already available. I forced new devices in my router with static IP addresses and changed the device names. The devices appeared in Pi.Alert as new devices with the names set in my router.

A

jokob-sk commented 4 months ago

Hi @tomerh2001 ,

I am open to accepting a PR for an ASUS import plugin. The Plugin system should be relatively easy to understand. I regrettably don't have an Asus router so implementing a plugin without the ability to quickly iterate and test it is very difficult.

Plugin documentation can be found here: https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins

An alternative is to use the dhcp.leases plugin or the SNMP plugin, if your router supports at least one of these protocols. Check the Settings for the DHCPLSS or SNMP plugin for details.

https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/snmp_discovery https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/dhcp_leases

tomerh2001 commented 4 months ago

I have just tested this and think the functionality is already available. I forced new devices in my router with static IP addresses and changed the device names. The devices appeared in Pi.Alert as new devices with the names set in my router.

A

What router do you have? Where did you change the names? How are you importing into NetAlert?

tomerh2001 commented 4 months ago

Hi @tomerh2001 ,

I am open to accepting a PR for an ASUS import plugin. The Plugin system should be relatively easy to understand. I regrettably don't have an Asus router so implementing a plugin without the ability to quickly iterate and test it is very difficult.

Plugin documentation can be found here: https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins

An alternative is to use the dhcp.leases plugin or the SNMP plugin, if your router supports at least one of these protocols. Check the Settings for the DHCPLSS or SNMP plugin for details.

https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/snmp_discovery https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/dhcp_leases

Uh, unfortunately I hardly have the time to do it, maybe hopefully I'll get some time in the near future

But if anyone else encounters it and wants to implement it, please do!!

jokob-sk commented 2 months ago

Hi @tomerh2001 ,

If you have some time, I've created a walkthrough of creating a custom plugin: Watch the video

πŸŽ₯Watch the video πŸ™‚

adm2k commented 2 months ago

Hi,

I left a comment when trying to watch the video. The audio is pretty bad, could barely hear even with column up all the way. I really would like to review this video but audio needs "fixing".

Thanks, al

jokob-sk commented 2 months ago

hey @adm2k can you check if this is better, regrettably I'm not a youtuber with great setup πŸ˜… https://youtu.be/cdbxlwiWhv8

adm2k commented 2 months ago

@jokob-sk

Much better, many thanks! al