This question has been flagged
1 Reply
3515 Views

i'am tried with this command and no ban accured if i lfailed to login more than 5 time 

sudo apt-get install fail2ban

sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local

> /etc/fail2ban/filter.d/odoo-login.local

nano /etc/fail2ban/filter.d/odoo-login.local

Add in the file:

[odoo-login]
    enabled = true
    port = http,https
    bantime = 900  ; 15 min ban
    maxretry = 4  ; if 4 attempts
    findtime = 600  ; within 10 min
    logpath = /var/log/odoo11/odoo11-server.log

Add in the following content:

[Definition]
    failregex = ^ \d+ INFO \S+ \S+ Login failed for db:\S+ login:\S+ from <HOST>
    ignoreregex =
sudo fail2ban-client reload
i need to know what makes it not working well and not ban if wrong logins


Avatar
Discard
Author

that's not solved question

can you see a log entry of fail attempt in your log file?

Best Answer

I have the same kind of problem,

In Fail2ban logs, cannot find record (more like it does not read the log file)


root@tempdev:/etc/fail2ban# fail2ban-client status

Status

|- Number of jail:      2

`- Jail list:   odoo-login, sshd

root@tempdev:/etc/fail2ban# 


Not enough karma for comment



Avatar
Discard