Gitea since 1.21 has a different logging configuration format.
TL;DR If you want to configure fail2ban to ban those failed ssh login attempts,
use this log section in app.ini
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
[log] LEVEL = Info MODE = file ROOT_PATH = /var/lib/gitea/log/ logger.default.MODE = file logger.access.MODE = logger.xorm.MODE = logger.router.MODE = ENABLE_SSH_LOG = true [log.file] default.FILE_NAME = gitea.log LOG_ROTATE = true MAX_SIZE_SHIFT = 28 DAILY_ROTATE = true MAX_DAYS = 7 COMPRESS = true COMPRESSION_LEVEL = -1 |
Sadly you can’t turn off all logging except the SSH log. You have to wear your SSD.
The actual fail2ban configuration is described on their website under Administration / Fail2Ban Setup