Comment on Am I doing this (networking) safely?
flork@lemy.lol 2 weeks agoThanks I’ll look into these. Quick question: how does fail2ban use port 80 if that’s already used by nginx?
Comment on Am I doing this (networking) safely?
flork@lemy.lol 2 weeks agoThanks I’ll look into these. Quick question: how does fail2ban use port 80 if that’s already used by nginx?
redlemace@lemmy.world 2 weeks ago
It does not. It does not uses ports at all. Fail2ban monitors your logfiles and activates the firewall to block IP’s that matched your rules.
t.ex. You can block an IP that tried to access https://<url>/admin. You can block an IP that used wrong credentials x times to login on an ssh port. Or block one that tried to relay via your mailserver. The duration is configurable and alternative duration can be configured for recidivists.
And yes, you can whitelist IP’s to avoid locking yourself out. The possibilities are endless.
flork@lemy.lol 3 days ago
I see, the default docker installer for fail2ban gave me an error because “Port 80 was already in use” (by NGINX Manager).
redlemace@lemmy.world 3 days ago
Fail2ban does not listen on any port for it has no user interface. No interface at all actually. It’s just a process that monitors your logfiles and changes firewall rules and writes to syslog if you tell it to.
I run it on internet facing servers so I use a ‘regular’ install and never docker. I see no advantage for docker in this case, but one huge disadvantage: Docker changes a lot on the network side. It creates bridges, and picks IP’s all by itself. I hate that. (I know you can put in a lot of effort to manage it, but no thanks stay of my network config thank you)