Share via

Event Log > Security Event ID 5156 and 5158 filling it up

Anonymous
2021-12-09T19:13:25+00:00

I am trying to use a Powershell scanner in PDQ Inventory (which runs a PS1 and enter the returning data into the asset) that scans the Security log for log on and log off events. The script then enters the data into that asset which allows us to see who has been using it and for how long (we are a school which generic computers all over). These log events are located in the Security logs.

In trying to research why we are only getting one MAYBE two user sessions I noticed that logs are getting FILLED with event 5156 and 5158. Upon research it's a log that the Windows Firewall allowed to pass. This is causing 1-7 events PER SECOND. This means the log gets filled to max in about 3-5 hours. So we only get 3-5 hours of user session events.

I looked around are there are some auditpol commands that people say stop this, however I want to restrict this is GP for obvious reason. I found a GPO for this in Machine > Policies > Windows Settings > Security Settings > Advanced Audit Configuration > Object Access > Audit Filtering Platform Connection

We set this to "No Auditing" by checking the box to configure it but leaving "Success" and "Failure" unchecked. GPRESULT /H shows this policy and the setting is "No Auditing". However, it still is logging these events. Did some research and found someone with the same issue and said it only works for them if it's added to the Default Domain Policy. While this is not ideal, we tried it. GPRESULT /H shows the change and it's assigned in the DDP, however it's STILL logging these events!

Running "auditpol /get /category:*" shows that "Filtering Platform Connection" is "success" even though we turned this off. Some how something is ignoring or over riding the DDP even. I am at a loss here, looking for help.

Increasing the size of the logs is not an option, even if we increase it 3x that is still only one day worth of user sessions (the PDQ scanner will over write the previous data, it will not append).

Thanks for any help!

Windows for home | Windows 10 | Settings

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

3 answers

Sort by: Most helpful
  1. Anonymous
    2021-12-10T05:31:57+00:00

    Hi esullivanasd,

    Thanks for posting here.

    Event ID 5156 is stands for "The Windows Filtering Platform has allowed a connection" and 5158 is stands for "The Windows Filtering Platform has permitted a bind to a local port", so I think it is also import to know what is/are going to access the internet. If you have already review the logs and believe, and then decide to disable this kind of logs, please try this command:

    auditpol /set /subcategory:”Filtering Platform Connection” /success:disable /failure:disable

    This will disable audits under the Filtering Platform Connection category.

    If you still seeing these kind of logs, I would suggest you to try confirm them manually in Event Viewer, coz sometimes a 3^rd^-party script might exports incorrect logs mistakenly.

    Please feel free to let me know if you’ve any further question, wish you a nice day!

    Best Regards

    Clara Geng | Microsoft Community Support Specialist

    1 person found this answer helpful.
    0 comments No comments
  2. Anonymous
    2021-12-22T17:43:24+00:00

    No one has anything?

    0 comments No comments
  3. Anonymous
    2021-12-10T13:03:47+00:00

    Thanks Clara. As stated in my post, I know what they are and I know there is an auditpol command to turn this off.

    However, there is also a GPO to do this, which is better vs having to run this command on 800 computers. I am trying to find out why the GPO is not working.

    0 comments No comments