OPNsense Forum

English Forums => General Discussion => Topic started by: Jyling on August 18, 2025, 07:32:19 PM

Title: Need to clear/reset firewall log - where is the file?
Post by: Jyling on August 18, 2025, 07:32:19 PM
Due to a glitch during the ISP migration, we got millions of entries in the log on that date, and now all of the log views in the admin web UI show nothing but that date for some reason.
I deleted /var/log/filter.log and rebooted but still see that date and nothing but that date.
How can I purge that date's entries?
Title: Re: Need to clear/reset firewall log - where is the file?
Post by: pfry on August 18, 2025, 09:23:14 PM
What does the "Firewall: Log Files: Plain View" -> "Clear log" button (bottom right) do? (I don't care to poke it on my live device.)
Title: Re: Need to clear/reset firewall log - where is the file?
Post by: Jyling on August 19, 2025, 09:46:15 PM
Does nobody know?
Title: Re: Need to clear/reset firewall log - where is the file?
Post by: Patrick M. Hausen on August 19, 2025, 10:49:47 PM
Doesn't the "Clear Log" button in the UI work for you?
Title: Re: Need to clear/reset firewall log - where is the file?
Post by: BrandyWine on August 20, 2025, 06:34:57 AM
Maybe awk sed the filter.log file to delete lines for that one date?
Or ssh in, stop fw service, rm or mv filter.log, then touch filter.log, just make note of perms from ls -a filter.log before deleting, chmod perms as needed, restart fw service.
That is, if the gui button does not work.
Title: Re: Need to clear/reset firewall log - where is the file?
Post by: Jyling on August 20, 2025, 02:21:09 PM
filter.log is a binary file that contains of 512kB of ASCII 0x00 but I still see log entries through the UI.
I do not want to clear all records, only those that are result of the glitch. There are valuable records from other dates.
There seems to be no correlation between the contents of filter.log and that which the UI is showing.