Feature #16997
openCoreDNS: Add configurable DNS TTL option in WebGUI
0%
Description
Description¶
Currently, the CoreDNS implementation/package uses a default TTL (5 minutes / 300 seconds) for served/cached records. For environments requiring rapid failover or dynamic re-routing, this default TTL is too high and leads to extended downtime while clients wait for local DNS cache entries to expire.
Use Case / Motivation¶
In enterprise and dynamic office setups, laptops frequently transition between wired (Ethernet) and wireless (Wi-Fi) connections or dynamic fallback IPs.
With a 5-minute TTL, when a user unplugged their Ethernet cable, their machine retained the cached IP for minutes before querying local DNS again, causing broken connections and delay during network failover.
By allowing a custom low TTL (e.g., 5 seconds), client OS caches expire almost immediately upon physical disconnect, enabling seamless automatic redirection to the secondary network/IP.
Proposed Solution¶
1. Add a configurable TTL / Minimum TTL field in the CoreDNS WebGUI settings page.
2. Allow setting custom integer values in seconds (e.g., range from 0 to 86400).
3. Generate the corresponding `cache` / `template` / plugin directive in the underlying `Corefile` based on this GUI setting.
Expected Result¶
Administrators can fine-tune DNS record lifetime directly from the pfSense UI to match their infrastructure's failover and mobility requirements.