Crowdsec and geoblock installed with Pangolin (middleware-manager discussion #63)

:speech_balloon: GitHub discussion middleware-manager #63 in General, started by PargsZ on GitHub

Crowdsec can now be installed with Pangolin, but it is not recognized by the Middleware Manager.
Also I’ve installed geoblock according to Pangolin docs and it’s not recognized either.

How should I deal with this? Uninstall both from Pangolin and use it from Middleware Manager?
Would be kinda nice if the Middleware Manager would detect already installed middlewares.


:speech_balloon: Join in here or on GitHub.

firesixtieone commented on GitHub:

Hi, any news on this ? I would like to install middleware-manager on my existant pangolin too and i found your issue.

Thanks

ghost commented on GitHub:

I also spent a bit of time trying to get this to work then found your issue.

PargsZ commented on GitHub:

I’ve uninstalled Middleware Manager completely. I’m using Pangolin to make my life easier so I don’t want to tinker around that much.

firesixtieone commented on GitHub:

@​PargsZ So you do not use any middleware or you do it by hand on traefik ?

PargsZ commented on GitHub:

I dont use any middleware.

compactly8274 commented on GitHub:

Also having this issue.

For more details the crowdsec is throwing an error that the plugin is unrecognized at “crowdsec@​file”.

There is no plugin at that location, and was working prior to MM but I changed everything around as I was getting duplicate plugin errors.

Tried with and without the docker container, tried with and without the bouncer. Tried provisioning the crowdsec container.

Also isn’t working with geoblock. It loads the config and I can attach the middleware, but it never functions. Again, it was working prior to MM, but after tearing it down to try to route everything through MM it’s not filtering IPs anymore.

Tried redoing all old files, tried grabbing new configs for geoblock, tried setting up geoblock to have local cache and database. Still not working.

jeroenbeuz commented on GitHub:

Same issue here. Crowdsec was working perfectly before adding middleware manager. Now I get the ‘plugin is unrecognized at “crowdsec@​file”’ error.

compactly8274 commented on GitHub:

I tried a ton of things yesterday and I got it working.

For crowdsec, the docker container still needs to be running, then the middleware-manager name for crowdsec needs to match the bouncer plugin name (crowdsec-bouncer-traefik) - It’ll then be able to match up with the file call. I named it the same in both the name and json, and I’m pretty sure it’s working now. It readded another plugin called “crowdsec” but if I add that one THAT one errors again, but the bouncer plugin function correctly.

For geoblock, I made sure it was in my dynamic and override yamls and configured to output to a log file, and it seemed to work. I’m not 100% on this one quite yet, but I had it filter some stuff in testing, but I’m not sure if it’s detecting cookies in my session when I switch to VPN or something, but it’s detecting sessions as my local IP a lot of the time, but filtering when it gets the VPN IP, so it seems?? like it’s working.

Either way, the documentation on this tool leaves a lot to be desired.

This forum post helped with deploying crowdsec, but left out the renaming the middleware bit:
Enhancing Your Pangolin Deployment with Middleware Manager

compactly8274 commented on GitHub:

On further testing changing it to the bouncer name doesn’t fix it, it removes the error but crowdsec fails to filter traffic effectively.

hhftechnology commented on GitHub:

On further testing changing it to the bouncer name doesn’t fix it, it removes the error but crowdsec fails to filter traffic effectively.

you have to insert logs separately for each resource/router. ping me on discord

jeroenbeuz commented on GitHub:

Any chance to post the solution here? This is what people (including me) find when searching for this issue. Ending up with a post that refers to discord is not really helpful.

zenigma99 commented on GitHub:

Same issue here. Can you please post a solution either on the hhft forum or somewhere else? Thanks!

hhftechnology commented on GitHub:

https://forum.hhf.technology/t/securing-pangolin-resources-with-crowdsec-and-the-middleware-manager-updated-guide

@​zenigma99 one of our mods have written a detailed guide on this