Skip to content

Conversation

@int2001
Copy link
Contributor

@int2001 int2001 commented Sep 27, 2025

Set custom Header (X-Login-Status: failed) on failed login.
This one can be processed by your Reverseproxy to block/ban/tarpit a possible attacker.

Possible haproxy-Config in backend could be (This example blocks the requester IP for 5mins if there were more than 10 failed requests either on API or loginpage)

backend wavelog
        mode http
	stick-table type ipv6 size 100k expire 5m store gpc0
	http-request track-sc0 src
	acl ip_blocked sc0_get_gpc0 gt 10
	http-request deny deny_status 429 if ip_blocked
	acl login_failed status 401
	acl header_failed res.hdr(X-Login-Status) -i "failed"
	http-response sc-inc-gpc0(0) if login_failed or header_failed
        server local 127.0.0.1:81 check maxconn 250

@int2001 int2001 requested a review from HB9HIL September 27, 2025 10:43
@int2001 int2001 added the security Security related label Sep 27, 2025
Copy link
Contributor

@phl0 phl0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worx

@int2001 int2001 merged commit b98ab2d into wavelog:dev Sep 27, 2025
@int2001 int2001 deleted the set_header branch November 11, 2025 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

security Security related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants