I'm getting the following attempts every few minutes, I'd to put a stop to it with Fail2Ban but so far I've been unsuccessful. I get no IP bans in the Fail2Ban panel in Plesk 12.
i use Plesk on a vserver which was offering it in version 11.x, i upgraded to 12.0.18, then i installed Dovecote on the panel. Everything went fine. Mail server is working.BUT sieve does not allow me to login and create filters.I tried telnet against 4190, and it works:
Connected to mail.xxxxxxxx.xxx. Escape character is '^]'. "IMPLEMENTATION" "Dovecot Pigeonhole" "SIEVE" "fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date ihave imapflags notify" "NOTIFY" "mailto" "SASL" "PLAIN LOGIN DIGEST-MD5 CRAM-MD5" "STARTTLS" "VERSION" "1.0" OK "Dovecot ready."
But when i use my sieve plugin for thunderbird OR access plesk's webmailclient Roundcube opening the filter module, it doesnt work. On Thunderbird i see the loading animation, thats it. On Roundcube it says "Unable to connect to sieve server".
Looks like something is missing. I can definitely access 4190 on my server from anywhere. So no firewall issue. I didnt change anything on configs, since plesk is handling it.Roundcube log doesnt give me anything. I dont even see logs added (to syslog or mail.*) while i try to connect.
Recently upgraded to Plesk 11.5 & upgraded to the latest CentOS kernel. Whenever I reboot the server DNS services do not work, can't view any websites hosted on the server etc.
Once I either restart BIND through Plesk Panel or
Code: # service named restart
Everything works perfectly.
My var/log/boot.log shows named started [OK]
When I run
Code: # service named status
Immediately after reboot everything looks normal, despite not resolving DNS until restarted.
I ran
Code: # ceckconfig --list
And both httpd & named services are displaying all 'off' on every runlevel. But, obviously named service is starting automatically, maybe by psa?
Should httpd & named be listed as on, is this the problem?
I has Parallels Ples 11.X with Cent OS 6.5 and yesterday i tried to upgrade to PLESK 12.0.18.
Now, I can't start the apache module because it´s impossible to create the config file
The issue is:
Details: [2014-09-17 19:46:27] ERR [util_exec] proc_close() failed [2014-09-17 19:46:34] ERR [panel] Apache config (14109759800.30476400) generation failed: Template_Exception: Can not restart web server: Service /etc/init.d/httpd failed to start Service /etc/init.d/httpd failed to start
file: /usr/local/psa/admin/plib/Service/Driver/Web/Server/Apache.php line: 104 code: 0 Can not restart web server: Service /etc/init.d/httpd failed to start Service /etc/init.d/httpd failed to start
I try with cp the certifies and writing a new private key but it didn't work.
So on our server, fail2ban got itself in a mess. Tried various things to fix, to no avail, so figured I'd just do a fresh install of it. There was minimal customisation to it that I couldn't re-do.
Note I'd already rm'd /etc/fail2ban - as on previous attempts, the files in here didn't appear to be restored to their defaults. So I figured removing the directory would force this to happen (Whether this was wise I'm not sure!) ;-)
So, following instructions here: [URL] .... I now get the following:
# wget http://kb.sp.parallels.com/Attachments/kcs-36245/fail2ban.gz # gunzip fail2ban.gz # mv fail2ban /etc/init.d/fail2ban # chmod 755 /etc/init.d/fail2ban # ll /etc/init.d/fail2ban /etc/fail2ban/fail2ban.conf ls: cannot access /etc/fail2ban/fail2ban.conf: No such file or directory -rwxr-xr-x 1 root root 2141 Aug 15 2014 /etc/init.d/fail2ban
I then uninstall/reinstall with # /usr/local/psa/admin/bin/autoinstaller
(Have tried via the web interface too)
I then get:
# ll /etc/init.d/fail2ban /etc/fail2ban/fail2ban.conf ls: cannot access /etc/fail2ban/fail2ban.conf: No such file or directory -rwxr-xr-x 1 root root 2141 Aug 15 2014 /etc/init.d/fail2ban
i.e., no change..
and if I go to the fail2ban settings in Plesk, I get:
If I go in plesk panel to: Home > Tools & Settings >IP Address Banning > Jails > managing Filters > add filter > type in name & filtercontent and save I get "Information: The jail filter was added". But i can not see the new added filter in the Plesk Filter List (still just the 12 Filters in the list).
On the filesystem > /etc/fail2ban/filter.d/ i can see the new file but with the extension .local - usulay the file is named like xyz.conf
The output of /usr/local/psa/admin/sbin/f2bmng --get-filters-list
Well with activated apache-badbots jails I have in a short time a hugh amount of banned IPs. Usualy action for this is to use iptables-ipset-proto and save all this baned IPs in the ipset insteed as normal in the iptables list - thats also a suggestion which was discussed in the fail2ban forum for better performance. And yes I had this running (ipset package installed) with my manual installation of fail2ban before I switched over to the plesk integrated.
action = iptables-ipset-proto6[name=BadBots, port="http,https,7080,7081"] insteed of action = iptables-multiport[name=BadBots, port="http,https,7080,7081"]
So how can I add iptables-ipset-proto4.conf, iptables-ipset-proto6-allports.conf, iptables-ipset-proto6.conf to the plesk version of fail2ban??
I have the problem that the ip blocked "failban" too short (set findtime=1800).
The ip should be blocked for 30 minutes (the second time).
2015-03-23 22:24:59,779 fail2ban.filter [2807]: INFO Set maxRetry = 5 2015-03-23 22:24:59,780 fail2ban.filter [2807]: INFO Set findtime = 1800 2015-03-23 22:24:59,781 fail2ban.actions[2807]: INFO Set banTime = 600
I would find an easy way to add a list of IP in Fail2ban whitelist in linux console.What is the file to modify ? Is there a command line or a process ?
12.0.18 Update #46, last updated at May 15, 2015 03:57 AM
Just recently (after update #46) Fail2Ban stopped working and I couldn't restart it or pin point the reason behind it. I decided to uninstall F2B component via Plesk installer.
F2B uninstalled however when I try to install it again I get error : 'Installation will not continue'
Where to start and where can I find log files that could give me some clues?
I installed fail2ban via the autoinstaller today. I got a failed install. There is no /etc/init.d/fail2ban file, and no /usr/bin/fail2ban-server.
On the other hand yum-search tells me it's installed:
plesk-fail2ban-configurator.noarch : plesk-specific jails and filters for fail2ban fail2ban.noarch : Scan logfiles and ban ip addresses with too many password failures
I tried to remove it in autoinstaller:
Installing packages Loaded plugins: fastestmirror, priorities Running rpm_check_debug Error in PREUN scriptlet in rpm package fail2ban
After changing website domain name (from development one -dev-domain.com- to production one) we have this error in fail2ban.log :
2015-02-01 06:46:41,176 fail2ban.filter [2848]: ERROR Unable to open /var/www/vhosts/system/dev-domain.com/logs/proxy_access_log 2015-02-01 06:46:41,176 fail2ban.filter [2848]: ERROR [Errno 2] No such file or directory: '/var/www/vhosts/system/dev-domain.com/logs/proxy_access_log' Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/server/filter.py", line 520, in getFailures has_content = container.open() File "/usr/lib/python2.7/dist-packages/server/filter.py", line 601, in open self.__handler = open(self.__filename) IOError: [Errno 2] No such file or directory: '/var/www/vhosts/system/dev-domain.com/logs/proxy_access_log'
I have just looked at the plesk panel log - /usr/local/psa/admin/logs/panel.log - and seen an alarming number of attempts to access plesk using the admin user. i.e.
[2015-02-02 14:53:46] ERR [panel] [Action Log] Failed login attempt with login 'admin' from IP 50.62.148.176
I have fail2ban installed and set up for other things...
i'm running 12.0.18#34 on PCS dedicated server. i recently discovered that some of the default jails on fail2ban that is shipped with Plesk 12 were not working correctly. Let me explain what i mean. For instance, the plesk-panel jail. The logs were parsed correctly, the command was successfully appended in iptables list, the fail2ban log was updated. Still, the intruder was not blocked. I kept reading "already banned" on the fail2ban.log but actually there was no blocking.
After some checks, i found out that fail2ban default configuration states SSH as default blocking port. that means, the block was working but only for ssh hits. thus the plesk-panel admin page hits were passing through.
since i added port=http,https on jail.local > plesk-panel and did it a restart on fail2ban service, only then did it start to actually block incoming hits.
I think this should be verified by programmers group and maybe include a fix in some future minor update.
I have updated from 11.5 to 12.0 mostly in order to use Fail2Ban.
I have also installed a new Plesk 12 license key to make sure that the license allows Fail2Ban. It says now that Fail2Ban is "On". But I can not find the menu entry to get to the Fail2Ban configuration. It is simply not there... (it is supposed to be in the Securitiy menu in the Tools and Settings section...)
In Fail2ban (great idea to include it in plesk!) settings you can set "Time interval for detection of subsequent attacks" (findtime) in general. But it would be interesting this setting per Jail.
You could have 2 jail with same filter but different findtime. Example:
Jail 1) 5 failures in 600 seconds: 1800 seconds ban Jail 2) 30 failures in 86400 seconds: 604800 seconds ban
There are bots that detect if you have some protection fail2ban or similar and it will adapt, login attempt every 300 seconds for example. Jail 1 no detect this attack, but Jail 2 yes.
See the example, live time : [root@--------- log]# cat /var/log/maillog | grep 'warning: ---------' Jul 14 07:10:54 --------- postfix/smtpd[5482]: warning: ---------[--.--.--.---]: SASL LOGIN authentication failed: authentication failure Jul 14 07:54:16 --------- postfix/smtpd[4782]: warning: ---------[--.--.--.---]: SASL LOGIN authentication failed: authentication failure
Fehler: f2bmng failed: Job for fail2ban.service failed. See 'systemctl status fail2ban.service' and 'journalctl -xn' for details. ERROR:f2bmng:Failed to start fail2ban service
-- Unit fail2ban.service has failed. -- -- The result is failed.
Aug 20 14:22:13 noreply.flusiserver.de systemd[1]: Unit fail2ban.service entered failed state. Aug 20 14:22:14 noreply.flusiserver.de agetty[14140]: /dev/hvc0: No such file or directoryClick to expand...
I'm just wondering how I can start logging activity in Fail2Ban. I've got the following line in the "logs" tab in "IP Address Banning" in the Plesk UI:
/var/log/fail2ban.log
However when I check this it states "The file is empty".
I'm assuming there will be a setting somewhere that tells fail2ban to log to that file but I'm not sure where/what it is?
I know for sure that I've had IP's banned but they just don't appear to be logged.
There is a strange problem with the new feature fail2ban. I have noticed that a local ip address (ip address from the webserver itself) was added to the blocked ip addresses of fail2ban now for the second time. What I can see is that it was the recidive jail.
If there is nginx used as reverse proxy you get a "502 Bad Gateway". Any way to find out more about the reason why an ip address is added to the list of blocked ip addresses in fail2ban?
we use CentOS Linux 7.0.1406 (Core) Plesk Version 12.0.18 Update #26 I got reports of several users on my system, and i can confirm this myself, that fail2ban is blocking courier imap and postfix connections when i try to connect to the Plesk Server with Outlook 2013 and theBat and the Apple Mac Mail Client.
I used the correct login information but fail2ban blocked the IPs for no obvious reason:
Code:
2014-12-03 12:46:57,908 fail2ban.actions[920]: WARNING [plesk-postfix] Ban 82.134.94.102 2014-12-03 12:46:58,049 fail2ban.actions[920]: WARNING [plesk-courierimap] Ban 82.134.94.102 I disabled the two jails now and it works perfectly. But why is fail2ban blocking valid requests ? I tried it myself and i did not enter a wrong password or something. MaxRetry is 5 so this should not be a problem. The problem is not affecting all users but just a few. However all of them are using correct credentials so i dont understand why they are being blocked at all.