I understand the security issue with using multiple IPs to log in, but as this is my first steps in self managing, I'm quite affraid of locking myself out. How would you proceed in doing so? Renting another vps and use it as personal VPN?
As for the subject of matter now,
Checked thefail2ban logs, I'm seeing postfix and dovecot related. Both seem mail related, not sure what the cause could be. Any ideas?
Code:
2020-05-24 14:12:17,937 fail2ban.filter [2605]: INFO [plesk-postfix] Found 94.66.xxx.xxx - 2020-05-24 14:12:17
2020-05-24 14:12:18,178 fail2ban.filter [2605]: INFO [plesk-postfix] Found 94.66.xxx.xxx - 2020-05-24 14:12:18
2020-05-24 14:12:18,862 fail2ban.filter [2605]: INFO [plesk-postfix] Found 94.66.xxx.xxx - 2020-05-24 14:12:18
2020-05-24 14:12:19,255 fail2ban.filter [2605]: INFO [plesk-postfix] Found 94.66.xxx.xxx - 2020-05-24 14:12:19
2020-05-24 14:12:19,901 fail2ban.filter [2605]: INFO [plesk-postfix] Found 94.66.xxx.xxx - 2020-05-24 14:12:19
2020-05-24 14:12:20,256 fail2ban.actions [2605]: NOTICE [plesk-postfix] Ban 94.66.xxx.xxx
2020-05-24 14:12:20,267 fail2ban.filter [2605]: INFO [recidive] Found 94.66.xxx.xxx - 2020-05-24 14:12:20
@Korkodilos_
I think that
@Arashi is pointing you to the right direction : a connection originating from a (bad) "old style" mail client.
At least, that might be one of the most feasible explanations for the log entries in fail2ban.log - nevertheless, you should check /var/log/maillog too!
A bit of explanation might help here : why can "old style" mail clients result in IPs being blocked by Fail2Ban?
Well, mail clients like Outlook and those on Apple devices are essentially badly configured - they attempt to connect continuously,
without closing connections.
If you had a device running on some IP and that device has a mail client connected to the mail server, then you will see lots of entries in /var/log/maillog.
And, since some "old style" mail clients essentially do not close connections, the mail client on the before mentioned device will cause new log entries over and over again, with those log entries containing an IP that you might not even use anymore.
Fail2Ban is triggered by the many occurrences of the one and specific IP in both /var/log/fail2ban.log and /var/log/maillog.
However, from your log entries it is clear that the plesk-postfix jail is
not blocking your IP - this jail is only identifying the IP!
The recidive jail
is blocking your IP - due to the many (read: 5) occurrences of the 94.66.xxx.xxx IP.
In the case that you want to allow traffic originating from the 94.66.xxx.xxx IP, you can safely consider to disable the recidive jail.
You can "consider" it, but I would not recommend it.
After all, it seems to be the case that you have a default Fail2Ban setup, as shipped with Plesk - this is not bad, but also not good either.
The above becomes immediately clear when considering the case below.
In the case that you do not want to allow traffic originating from the 94.66.xxx.xxx IP anymore, then there is this issue with a wrong setup : if the 94.66.xxx.xxx IP should be blocked, then plesk-postfix jail should be blocking it, not the recidive jail.
In short, if you want to block the 94.66.xxx.xxx IP, then reconfigure the plesk-postfix jail and/or add a custom Fail2Ban jail or Fail2Ban filter.
Please note that the odd behaviour of "old style" mail clients can help you here : it often is sufficient to renew the SSL certificate for the mail server
for the one and specific domain that causes the log entries in /var/log/fail2ban.log and/or /var/log/maillog, since most of the "old style" mail clients stop connecting to the server if the certificates are renewed.
The above should be viewed as a dirty work-around that enables you to keep the recidive jail intact - which is to be preferred, by the way.
Otherwise, if you do not want to block the 94.66.xxx.xxx IP, you can simply disable (but not remove) the recidive jail or, even better, reconfigure Fail2Ban and change some jails and filters.
In my humble opinion, it is highly recommended that you keep things simple - use a static IP and whitelist this one IP.
In addition, it is highly recommended to improve the Fail2Ban configuration, if you still use the default Fail2Ban config as shipped with Plesk.
Hope the above helps a bit.
Kind regards..........