nitaybz / homebridge-network-presence

Homebridge plugin that provides occupancy sensor for devices presence in your network
MIT License
40 stars 6 forks source link

Reverse DNS Lookups #4

Open rweckhoff opened 3 years ago

rweckhoff commented 3 years ago

First of all ... nice work.

I do not know if this is a problem or not, however, I am noticing a significant amount of reverse DNS lookups occurring while this plugin is installed and enabled. Polling for 4 devices (Mac address or IP) is generating thousands of DNS queries every 5 minutes.

gdotp01 commented 3 years ago

Yep,I’m seeing the same. I noticed it tonight when checking my pi.hole server. See attached this is just the last 24 hours. 7056B2C7-FC6F-48EB-95F6-FBD1D0A7CFA3

nitaybz commented 3 years ago

I released a new version that sets the default polling to "every 10 seconds" instead of 1 and the ability to change the interval to the desired amount of time in seconds. hope it reduces the traffic to an acceptable value...

nitaybz commented 3 years ago

https://github.com/nitaybz/homebridge-network-presence/releases/tag/v1.0.6

nitaybz commented 3 years ago

Please try v1.2.0... I've optimize the network scanner, please test it

rweckhoff commented 3 years ago

Upgraded to 1.2.1

Same observation.

Screenshot at 4:02 / with DNS exclusions for local .arpa requests

Screenshot at 4:07 / without DNS exclusions. Almost 8K in DNS lookups. 30 second polling configured.

Screenshot at 4:16 / with DNS exclusions for local .arpa requests back in place

image

image

image

nitaybz commented 3 years ago

"8K in DNS lookups." - is it in 5 minutes? means 800 on each request? is it only the plugin that creates those lookups? please share more specific information if you can...

nitaybz commented 3 years ago

is it possible that you have multiple subnets for this plugin to look into? do you have a normal network setup? will it help if i'll add ip range or subnet range so it will not look through your entire network?

rweckhoff commented 3 years ago

Sorry away from the computer, however, here is the screenshot of my network. Homebridge and AdGuard running on docker containers. 192.168.1.x is my primary network. Second screenshot shows reverse lookup traffic on the 192.168 and 10.0 network ranges.

Thanks, Bob

image

image

nitaybz commented 3 years ago

So I think the amount of traffic is due to the complexity of your network... I'll add an option to set IP range or subnet range and it should help you reduce the amount of traffic by focusing the scan on the desired range.

jealousofyou commented 3 years ago

I've used the addressRange option in v1.2.3 and Pi-Hole shows that the Homebridge device is still doing lookups of IP addresses outside that range.

julianq commented 2 years ago

Realize this is a bit of thread necromancy, but I'm having the same issue. I have my PiHole to refuse requests to a client after 1,000 DNS requests within 60 seconds, and this plugin is hitting that limit constantly.

I've increased polling interval and set the address range.