Scenario is not banning IP
I am trying to get a ban decision with the following parser and scenario
Scenario:
Parser:
I don't know where I did something wrong in the configuration.
11 Replies
Important Information
This post has been marked as resolved. If this is a mistake please press the red button below or type
/unresolve
© Created By WhyAydan for CrowdSec ❤️
These are the outputs of the cscli metrics command:
It most likely an issue with your parser, at bottom of your statics you are setting parsed IP to the same value. Change
parsed:
to meta:
cause we expect that meta value in s02 stage.
Ohh wait scrap that, the metrics states it overflows.
Do you see anything in crowdsec log file?I see this line:
Ahh then it goes back to what I said, you need to change your bottom static to set meta instead of parsed
Thank you, It now creates ban decision.
How did you know I had to change the value ? Trying to understand where I was wrong in my thinking.
But is it normal, that if I still try to continue to attempt the login, that the mosquitto logs show me more connection attempts? Shouldn't the packets from that IP be blocked at this point from the firewall through the bouncer, so they wouldn't reach the application anymore?
It depends where does mqtt operate?
Like within a container?
Yes, it is running inside a container and the container port 8883 is mapped to the host port 8883
But my crowdsec security engine and my bouncer are running on host. So when an IP gets banned, shouldn't it be on host level, not allowing any packets pass through to the docker container?
Do I have to uncomment the DOCKER-USER in the .yaml config of the bouncer?
Yes
Just remember if you get blocked you will loose all connections so make sure you have a way to access if you loose SSH
I am using a VPN for testing with different IP addresses for this purpose 😄
Ok great this works now 😄
Thanks a lot 😄
Resolving Scenario is not banning IP
This has now been resolved. If you think this is a mistake please run
/unresolve