Text of discourse.crowdsec.net › t › crowdsec-ufw-modification-github-docker › 1055 as Styx crawled it on Nov 18, 2026. The page may have changed since. Only its words are kept, without pictures or layout.

Open the live page

Crowdsec & UFW modification (Github) & Docker - crowdsec - CrowdSec

Crowdsec & UFW modification (Github) & Docker crowdsec mcdaniels December 4, 2022, 12:07pm 1 Hi folks, I am using docker on a vserver. As (without modification of ufw.after rules) ufw is not blocking anything when it comes down to docker exposed ports, I used GitHub - chaifeng/ufw-docker: To fix the Docker and UFW security flaw without disabling iptables modification. From now on I can allow (or not) connections to exposed docker ports by e.g. ufw route allow proto tcp from mystaticip to any port 9443 But, what If I give crowdsec (containerized) a shot (additionally to the modded ufw)?

AFAIK crowdsec also works with iptables. Will crowdsec work as expected in this situation? OR Will they interfere (ufw & crowdsec) and “destroy” a working iptables config? As I am at a VSERVER, standing in the wild (=Internet) I can not go without firewall. So I have to have a working ufw (iptables) firewall. iiAmLoz December 6, 2022, 4:43pm 2 I’m trying to wrap my head around it. If your only allow your ip through everything else is blocked then crowdsec wont add any value here because no other ip than yours can connect. unless you do have other service exposed.

However, at that point it would of been better for you to use something like nginx to reverse proxy to docker then only allow your ip to port 80,443. Cause then you wouldnt need to add a route for each docker port, you would only need to update your nginx config to allow a new subdomain or path to a new application. However, that how I would of handled it. mcdaniels December 6, 2022, 6:00pm 3 Hi and thanks for your reply.

Well I should have been clearer. At the moment I only allow my static ip to connect to docker containers. I am having Nginx-Proxy-Manager in place. Also a nextcloud-container is running. The only things - open to the wild - are Port 443 and 80, but only from my official static ip at the moment (done by ufw and route allow from xxx) and only to the ip of the Nginx-Proxy-Manager. The Nginx-PM forwards requests to my fqdn of Nextcloud to the dockercontainer.

But what if I open Nextcloud for “all”? At this point I may want to use crowdsec, but I am very unsure whether it will work, without interfering the iptables of ufw, when banning ips etc. So what If I have the ufw modification in place & docker with iptables & crowdsec? Will this work as expected? iiAmLoz December 6, 2022, 7:52pm 4 From what I can tell from ufw script, it will be fine, we prepend to the top of the chains you configure.

So in theory the default input chain should be fine. So yes if you plan to open to internet then crowdsec would add value. Related topics Topic Replies Views Activity Setting up crowdsec (native on host) with nginx proxy manager (running in docker) crowdsec 2 4274 February 17, 2025 Secure Nginx Proxy Manager Docker Instance with Crowdsec? Uncategorized 10 2235 January 6, 2025 Beginner issues, not everything getting blocked crowdsec 4 2675 January 14, 2024 IP in Blocklist not blocked from iptables crowdsec 5 546 March 24, 2025 Ipset, performance, whitelist, api, dashboard, postfix logs crowdsec 4 1360 October 16, 2020