easyengine icon indicating copy to clipboard operation
easyengine copied to clipboard

Improve the EE security with adding Fail2Ban

Open chiotis opened this issue 12 years ago • 13 comments

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 avatar Feb 08 '14 17:02 chiotis

@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.

rahul286 avatar Feb 08 '14 19:02 rahul286

Any update on adding fail2ban?

Chubble avatar May 23 '14 03:05 Chubble

Vote +1

thenoobi avatar May 23 '14 04:05 thenoobi

I would love to see Fail2Ban and UFW included

lumpysimon avatar Oct 03 '14 14:10 lumpysimon

@rahul286 Fail2ban would be awesome.

pnommensen avatar Dec 08 '14 03:12 pnommensen

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.

MattyLB avatar Dec 08 '14 08:12 MattyLB

@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 :).

ghost avatar Dec 08 '14 16:12 ghost

@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

MiteshShah avatar Dec 09 '14 10:12 MiteshShah

@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.

lumpysimon avatar Dec 09 '14 11:12 lumpysimon

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 avatar Dec 09 '14 11:12 rahul286

@rahul286 have you made any progress on including fail2ban and ufw? sorry if this is a dumb question, I'm new to EE.

adambreen avatar Apr 13 '17 01:04 adambreen

@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/

rahul286 avatar Apr 13 '17 09:04 rahul286

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.

rahul286 avatar Aug 03 '18 12:08 rahul286