OPNsense Forum

English Forums => General Discussion => Topic started by: vimage22 on December 24, 2025, 04:48:28 PM

Title: modified frequently, resolv.conf and hosts
Post by: vimage22 on December 24, 2025, 04:48:28 PM
These 2 files are "modified" every hour?
/etc/hosts  and  /etc/resolv.conf
Since nothing is changing from the WAN, is there a setting to prevent file modification if nothing changes?

From the System: Log Files: General log: [dhcp6c]
Noticedhclientdhclient-script: Creating resolv.conf
Noticedhclientdhclient-script: New Hostname (igc0): OPNsense
Noticedhclientdhclient-script: Reason RENEW on igc0 executing
Title: Re: modified frequently, resolv.conf and hosts
Post by: Patrick M. Hausen on December 24, 2025, 04:54:56 PM
If your ISP forces a renew of the lease every hour, the configuration will be updated every hour, wether it actually changed or not.

Possibly disabling System > Settings > General > Allow DNS server list to be overridden by DHCP/PPP on WAN helps.
Title: Re: modified frequently, resolv.conf and hosts
Post by: vimage22 on December 24, 2025, 05:09:00 PM
OK, thanks for your reply. But I use unbound with DoT with the NAT rule to force LAN DNS to unbound. I will try testing this, but want to prevent unencrypted DNS traffic.
Title: Re: modified frequently, resolv.conf and hosts
Post by: vimage22 on December 24, 2025, 05:27:43 PM
Just tested and no change. BTW, the motivation for this is to reduce disk writes.