docker-nginx-proxy-manager icon indicating copy to clipboard operation
docker-nginx-proxy-manager copied to clipboard

fail2ban support

Open timdonovanuk opened this issue 5 years ago • 5 comments

Many thanks for this great tool!

Is there any chance of getting fail2ban baked in to this? I know there is already an option to "block common exploirts" but I'm not sure what that actually does, and fail2ban is quite a robust way of dealing with attacks.

Many thanks.

timdonovanuk avatar May 26 '20 13:05 timdonovanuk

I think that this kind of functionality would be better served by a separate container. Multiple applications/containers may need to have fail2ban, but only one instance can run on a system since it is playing with iptables rules.

jlesage avatar Jun 08 '20 01:06 jlesage

But with nginx-proxy-manager the primary attack vector in to someones network is...well...nginx-proxy-manager! I suppose you could run nginx with fail2ban and fwd to nginx proxy manager but sounds inefficient.

timdonovanuk avatar Jun 08 '20 08:06 timdonovanuk

I agree than Nginx Proxy Manager is one of the potential users of fail2ban. And to be more precise, it's not really NPM itself, but the services it is proxying.

But if you take the example of someone also running an SSH server, you may also want fail2ban on it. Same thing for an FTP server or any other kind of servers running on the same machine.

So as you see, implementing fail2ban in NPM may not be the right place. However, having a separate instance of fail2ban (either running on the host or on a different container) allows you to monitor all of your containers/servers.

jlesage avatar Jun 08 '20 11:06 jlesage

The stream option in NPM literally says "use this for FTP, SSH etc." so even in your example above, NPM could still be the primary and only directly exposed service!

timdonovanuk avatar Jun 09 '20 09:06 timdonovanuk

Hello, on host can be configured with geoip2 , stream I have read it could be possible, how?

Thanks

Oscarperez-1980 avatar Jan 27 '22 16:01 Oscarperez-1980