TechnitiumSoftware / DnsServer

Technitium DNS Server
https://technitium.com/dns/
GNU General Public License v3.0
3.86k stars 403 forks source link

[Feature Request] DNS record scavenging #699

Open micush opened 10 months ago

micush commented 10 months ago

Hi,

It's possible to implement DNS record scavenging? Maybe make a configurable value to where if a record isn't queried for X amount of time it's removed automatically? It would make for a more accurate database.

-micush

ShreyasZare commented 10 months ago

Thanks for the request. Will plan for this feature.

JManDoo commented 9 months ago

maybe make a definition of records marked as Static and Dynamic, since you have RFC 2136 now. I use a DHCP Script on my Mikrotik router that is handing out DHCP Leases, and it uses RFC2136 to update DNS for the lease's host name

Mikrotik dns-update tool documentation

Example Mikrotik CLI that works to update the DNS Server with a dynamic A record /tool/dns-update dns-server="X.X.X.X" name="$leaseClientHostname" zone="foo.bar" address="$leaseActIP" ttl="$ttl"

if a record was created this way, we would mark it as dynamic and you could deleted it, if it hasn't been "Updated" based on a period of time

Just have to say that I love Technitium, its simply awesome!

ShreyasZare commented 9 months ago

maybe make a definition of records marked as Static and Dynamic, since you have RFC 2136 now.

The records are not "static" or "dynamic" by themselves just because they were added using Dynamic Updates protocol. Such tagging will cause confusion. RFC 2136 is a generic protocol feature and not just for dynamic IP updation.

I use a DHCP Script on my Mikrotik router that is handing out DHCP Leases, and it uses RFC2136 to update DNS for the lease's host name

Mikrotik dns-update tool documentation

Example Mikrotik CLI that works to update the DNS Server with a dynamic A record /tool/dns-update dns-server="X.X.X.X" name="$leaseClientHostname" zone="foo.bar" address="$leaseActIP" ttl="$ttl"

if a record was created this way, we would mark it as dynamic and you could deleted it, if it hasn't been "Updated" based on a period of time

That's not how its supposed to work as per RFC 2136. The DHCP server is supposed to remove the IP by itself when the DHCP lease expires. The record cannot be just removed automatically because it was added using RFC 2136.

Just have to say that I love Technitium, its simply awesome!

Thanks for the compliments!