Improve the EE security with adding Fail2Ban
I was wondering, how possible would be to focus on the security of the LEMP server of EasyEngine by adding Fail2Ban, in the package.
The idea came to me by reading this article http://kovshenin.com/2014/fail2ban-wordpress-nginx/
I am not a security expert. I just think that if EasyEngine focuses more to the security side, it would be a top-notch tool for easy wordpress deployment.
@chiotis we are already using fail2ban on our servers.
It will be added to EasyEngine after 2-3 months. There will be one "security" release which will have fail2ban plus few more tools.
Any update on adding fail2ban?
Vote +1
I would love to see Fail2Ban and UFW included
@rahul286 Fail2ban would be awesome.
I have to agree with Patrick on this one. Great security feature!
On Sun, Dec 7, 2014 at 9:37 PM, Patrick Nommensen [email protected] wrote:
@rahul286 https://github.com/rahul286 Fail2ban would be awesome.
— Reply to this email directly or view it on GitHub https://github.com/rtCamp/easyengine/issues/118#issuecomment-65972524.
@lumpysimon UFW comes stock with Ubuntu 14.04 and 14.10 IIRC, so there's no need to add it, only activate it using. This has been my experience. I normally use minimal installations and it's always off by default, but it is present.
You can check the status using sudo ufw status and then use sudo ufw enable to enable. If it's not there, sudo apt-get install ufw -y should take care of it for you :).
@iouxui By using ufw you cant block brute-force attack Once you allow some port on ufw they accept all the traffic
For example we allowed port 80 and 443 using ufw and blocked all the other ports Now some attacker still brute-force to wp-config.php and ufw is not useful in this case.
By using fail2ban we can detect and block some ip for particular time
@iouxui - What I meant to say was including fail2ban and ufw in EE already configured to deal with common attacks, brute force, etc.
@MiteshShah - Fail2ban in combination with ufw is a very effective way to block brute force attacks against wp-config. One way is to write a simple plugin that logs failed login attempts in the error log, then have a custom fail2ban filter that adds a ufw rule to block the IP address. Something like I did here, although that needs tweaking as it uses iptables rather then fail2ban.
We are already using fail2ban with log monitoring - https://rtcamp.com/tutorials/nginx/fail2ban/
It's just that it's not added into EE as of now. It will be added soon.
Currently focus is on https://github.com/rtCamp/easyengine/tree/python
Feel free to send any more suggestions. Once EE 3.0 with python gets out, we will be taking care of all backlog in EE 3.1.
@rahul286 have you made any progress on including fail2ban and ufw? sorry if this is a dumb question, I'm new to EE.
@adambreen We don't have fail2ban integrated into EE yet.
In case you want to setup manually, please check https://easyengine.io/tutorials/nginx/fail2ban/
Update: closing this as v4 is docker based and we are avoiding any tools that are specific to OS. Users may follow our article above ☝️for manual instructions.