Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better log cleaning (surgical line removal) #4

Open
EvergreenCartoons opened this issue Sep 18, 2022 · 0 comments
Open

Better log cleaning (surgical line removal) #4

EvergreenCartoons opened this issue Sep 18, 2022 · 0 comments

Comments

@EvergreenCartoons
Copy link
Owner

EvergreenCartoons commented Sep 18, 2022

After much searching, the following might be usable for surgical log editing:

printf '%s\n' 'g/python-requests/d' w q | ed -s /var/log/pfblockerng/dnsbl.log

We can do the same with nginx.log, etc.

We would need something to reliably match on, user-agent seems pretty reliable. Given these are firewalls, odds are they are at the very edge of the network anyway, so "blending in" with a user agent seems kind of pointless given we are zapping the logs. Also, TLS is in play.

Might consider it for the cleanup script...

I should look and see if this thing ships logs to somewhere. I bet the cheeky fucker does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant