OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • Archive »
  • 19.1 Legacy Series »
  • [Solved] Firewall logging stopped, live view shows outdated entries only
« previous next »
  • Print
Pages: [1]

Author Topic: [Solved] Firewall logging stopped, live view shows outdated entries only  (Read 6804 times)

hbc

  • Hero Member
  • *****
  • Posts: 501
  • Karma: 47
    • View Profile
[Solved] Firewall logging stopped, live view shows outdated entries only
« on: April 26, 2019, 08:47:44 am »
My live log stopped, filter.log is empty and I have no idea how to get it working again.

I checked and uncheck the "Log Firewall Default Blocks" rules, reset/cleared all logs, rebooted, added the log option to nearly every rule, but no entries in live view, overview or plain view. filter.log stays empty.

Tried also:
https://forum.opnsense.org/index.php?topic=9542.0

Did not help either

My current workaround is:
Code: [Select]
#  tcpdump -n -e -ttt -i pflog0
So, pflog0 interface is working. What component is between pflog0 and live view?

filterlog and syslog are running:

Code: [Select]
55019  -  Ss     0:00.05 /usr/local/sbin/filterlog -i pflog0 -p /var/run/filterlog.pid
60021  -  Ss     0:00.10 /usr/local/sbin/syslogd -s -c -c -P /var/run/syslog.pid -l /var/dhcpd/var/run/log -l /var/unbound/var/run/log -f /var/etc/syslog.conf

System is a fresh installation with 19.1.4 updated to 19.1.6. No mods in file system have been done, just configurations via web gui for interfaces and carp. Now I wanted to start adding rules and boom ... no logs to check.
« Last Edit: May 09, 2019, 10:37:16 am by hbc »
Logged
Intel(R) Xeon(R) Silver 4116 CPU @ 2.10GHz (24 cores)
256 GB RAM, 300GB RAID1, 3x4 10G Chelsio T540-CO-SR

hbc

  • Hero Member
  • *****
  • Posts: 501
  • Karma: 47
    • View Profile
Re: Firewall logging stopped, live view shows outdated entries only
« Reply #1 on: May 01, 2019, 10:47:48 am »
No ideas?
I made factory default reset and imported backup in sections.
Lagg devices, vlan, interfaces, gateways, system, dhcp, everything ok.

But then, when Importing firewall rules, the live view stops.

Next attempt, I will create rules manually again.

What could be the reason for live view to stop? I guess something with aliases or firewall groups.
Logged
Intel(R) Xeon(R) Silver 4116 CPU @ 2.10GHz (24 cores)
256 GB RAM, 300GB RAID1, 3x4 10G Chelsio T540-CO-SR

vikozo

  • Full Member
  • ***
  • Posts: 211
  • Karma: 5
    • View Profile
    • wombat.ch
Re: Firewall logging stopped, live view shows outdated entries only
« Reply #2 on: May 01, 2019, 12:30:51 pm »
maybe it has something to do with alias
https://forum.opnsense.org/index.php?topic=12464.0
Logged
apu2c4 / wle200nx / 240 Disk --> Firewall | FW-03
---
OPNsense 22.1.6-amd64
FreeBSD 13.0-STABLE
OpenSSL 1.1.1n 15 Mar 2022

hbc

  • Hero Member
  • *****
  • Posts: 501
  • Karma: 47
    • View Profile
Re: Firewall logging stopped, live view shows outdated entries only
« Reply #3 on: May 01, 2019, 05:12:35 pm »
Quote from: vikozo on May 01, 2019, 12:30:51 pm
maybe it has something to do with alias
https://forum.opnsense.org/index.php?topic=12464.0
I don't think so. I tried 19.1.4 and same problem. My 19.1.6 has applied 4 patches to fix aliases.
It must be something that interferes with filterlog and prevents that log entries get displayed in gui.
Can you accidentally drop the communication with filterlog with rules or redirects?
Logged
Intel(R) Xeon(R) Silver 4116 CPU @ 2.10GHz (24 cores)
256 GB RAM, 300GB RAID1, 3x4 10G Chelsio T540-CO-SR

hbc

  • Hero Member
  • *****
  • Posts: 501
  • Karma: 47
    • View Profile
Re: Firewall logging stopped, live view shows outdated entries only
« Reply #4 on: May 07, 2019, 12:53:22 pm »
The problem exists again. There seems to be a configuration that prevents filterlog-daemon to update /var/log/filter.log. It worked while restoring machine from scratch and adding settings and rules.

And now after adding some Outbound rules, VIP, etc., live view is stale again. It must be an option that gets activated by reboot, because the last log entry is before a firewall reboot. So much harder to debug, since this machine needs ages to reboot.

I tried to restart filterlog daemon manually, but it does not even touch the filter.log file.

Can anybody explain the expected flow of logs into live view?

pf generates logs into pflog0 interface and filterlog reads this interface and write entries to filter.log? Or how is filter.log updated? What could prevent updates? IP sockets used, unix sockets? What could interfere?

Update:
Seems to be an issue with Tuneables. Set to default and reboot solved the problem. Now I have to figure out which sysconfig option stops my live view and why.
« Last Edit: May 07, 2019, 04:39:54 pm by hbc »
Logged
Intel(R) Xeon(R) Silver 4116 CPU @ 2.10GHz (24 cores)
256 GB RAM, 300GB RAID1, 3x4 10G Chelsio T540-CO-SR

hbc

  • Hero Member
  • *****
  • Posts: 501
  • Karma: 47
    • View Profile
Re: Firewall logging stopped, live view shows outdated entries only
« Reply #5 on: May 09, 2019, 10:37:03 am »
Problem found. Too much hardening. Seems as filterlog does not request explicit read access.

Code: [Select]
# bpf is write-only unless program explicitly specifies the read filter (default 0)
net.bpf.optimize_writers = "1"
Logged
Intel(R) Xeon(R) Silver 4116 CPU @ 2.10GHz (24 cores)
256 GB RAM, 300GB RAID1, 3x4 10G Chelsio T540-CO-SR

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • Archive »
  • 19.1 Legacy Series »
  • [Solved] Firewall logging stopped, live view shows outdated entries only
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2024 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2