UFW and Fail2ban config

Hi, Can someone guide me on proper ufw and fail2ban configs for erpnext?
I think I reseted fail2ban and ufw settings.
Also does fail2ban protect against brute forcing erpnext? DDos? or data gathering?
Tnx

ufw allow 80
ufw allow 443

typically those are the only ports you need to open for std erpnext install. if you ssh into your instance - then you need to allow ssh

ufw allow ssh

ufw status will show you which rules are active. ufw delete 4 (line number from ufw status command) will delete that ruleā€¦

Read up on fail2ban config and other ufw rules (filter by ip-address etc) for more custom setup