Score:0

Fail2ban - IP banned is able to connect

cn flag

I am using Ubuntu Server 20.04.

I installed fail2ban and it is correctly banning the IP but still its able to connect. Giving below the fail2ban.log snippet.

2021-07-19 09:52:14,543 fail2ban.filter         [1254638]: INFO    [postfix-sasl] Found 218.4.239.146 - 2021-07-19 09:52:14
2021-07-19 09:52:21,285 fail2ban.filter         [1254638]: INFO    [postfix-sasl] Found 218.4.239.146 - 2021-07-19 09:52:21
2021-07-19 09:52:21,457 fail2ban.actions        [1254638]: WARNING [postfix-sasl] 218.4.239.146 already banned

My jail.local has the following for postfix-sasl

[postfix-sasl]

enabled = true
filter   = postfix[mode=auth]
port     = smtp,465,submission,imap,imaps,pop3,pop3s
# You might consider monitoring /var/log/mail.warn instead if you are
# running postfix since it would provide the same log lines at the
# "warn" level but overall at the smaller filesize.
logpath  = %(postfix_log)s
backend  = %(postfix_backend)s
action = iptables-multiport
maxretry = 2
findtime = 600
bantime = 86400

My banaction is also given below.

banaction = iptables-allports
banaction_allports = iptables-allports

Please do let me know if I am setting it up properly.

Score:1
co flag

I installed fail2ban and it is correctly banning the IP but still its able to connect

See the answer for second question ("Ban takes place but does not work, the intruder is still able to connect and continues an attack") in the wiki :: How fail2ban works.

action = iptables-multiport

Don't set action directly, because it overwrites mandatory (default) settings the action would need. Use banaction instead or supply all parameters the action may need, see jail.conf#L212.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.