Custom bad user agents

Hi,
i am new to crowdsec. First thing I wanna do is to block following bad user agents:

  • claudebot
  • Bytespider
  • bytedance
  • facebookexternalhit

I had a look at https://hub-data.crowdsec.net/web/bad_user_agents.regex.txt and could not find these agents.

So my question is, what is the best way to add these agents to keep crowdsec updateable.
Hope that s.o. can help me out …
Best regards, Alexander

Best way would be to create a copy of the bad user agents scenario and define your own data file. Note to change the name key that within the scenario to something else such as my/bad-user-agents

Please note that the datafiles of “local” made scenario are not automatically downloaded so you would have to ensure those files are download manually to the data directory. You can find the configured data directory by looking at the config.yaml within the crowdsec directory.

Ok, thank you so much !

I have a last question regarding this issue.

How can I set the trigger to manually download the datafiles? Or is it enough to copy the data file to data dir manually? Perhaps there is some more documentation out there I haven’t got so far

If you host a file externally like on github, you can just use a cronjob to download these or scp them. Basically any downloading or copying software can work.