kyprizel / testcookie-nginx-module

simple robot mitigation module using cookie based challenge/response technique. Not supported any more.
http://kyprizel.github.com/testcookie-nginx-module/
524 stars 139 forks source link

Looking for some way to know when user passed testcookie validation correctly #39

Closed pavel-odintsov closed 8 years ago

pavel-odintsov commented 8 years ago

Hello!

I'm looking for some way to check if user passed testcookie validation. With this knowledge I want to build static banlist from testcookie output and deploy it with iptables ipset module and move away malicious traffic from the nginx.

I've found debug log messages about validation progress but they are working only when nginx compiled with debug mode.

Could you offer nginx variable with validation result information for request? I interested in both positive and negative result.

kyprizel commented 8 years ago

there are varibalbes:

$testcookie_got - cookie value received from client, empty if no cookie or it does not match format $testcookie_set - correct cookie value we're expecting from client $testcookie_ok - user passed test (1 - passed, 0 - not passed) Note: changed from "yes"/"no" in v1.10

pavel-odintsov commented 8 years ago

Oh, me bad. I miss official docs again :( Thanks!