Page 1 of 2

nginx and csf

Posted: 09 Jun 2012, 11:26
by bctrainers
Hello, I've searched around for this however have not had much results.

Does ConfigServer Firefall/LFD work with the nginx installation? Ever since I swapped over to nginx, CSF went silent on attack floods on the httpd.

What do i need to provide to help get regular expressions created for the detection of such events on nginx? :confused:

Re: nginx and csf

Posted: 07 Jul 2012, 14:36
by OneApplications
I'd really like to know the same. I recently switched form Apache to Nginx and love it! Really lightweight and fast compared to Apache. Combined with PHP-FPM it really works well running my site.

One thing I don't have though is any LFD protection because, by the looks of it, CSF+LFD doesn't offer any "out of the box" supprot for reading the Nginx error logs. I know I can write my own regex for this but the whole regex thing is just a completely different language to me! I don't understand the first thing about it and I'd rather not have to learn all about it just to implement this.

What I'm actually doing at the moment is compiling a small perl script that will either run as a cron job or as a service. This will scan the nginx error log every 5 mins or so. If the log has been updated since that last read, it reads the new log lines and converts these into standard Apache v2 log format. This is then written to /var/log/httpd/error.log. LFD then scans this file as normal just as though Apache was installed and blocks any rouge IPs.

I know this may seem like a bit of a long winded work-around but until CSF supports nginx in its standard regex, I think it may be the best solution. I must stress that I haven't tested this script yet, in fact I have only just started writing it but fingers crossed it will give good results. I'll just start passing 403 and 404 errors to start with and see how it goes.

Any update from the CSF guys on whether nginx is likely to be supported in the near future would be greatly appreciated.

Cheers,

Chris.

Re: nginx and csf

Posted: 12 Aug 2012, 09:46
by chirpy
We'll consider it for the future.

Re: nginx and csf

Posted: 30 Jan 2013, 14:21
by darkroast
I know it's only been a couple of months, but has this made it onto the radar yet? I really like the speed boost nginx gives (along with varnish), but I get the following message
atlanta lfd[23996]: STATS: Unable to retrieve Apache Server Status [http://127.0.0.1/whm-server-status?auto] - Unable to download: Not Found
and from other things I've read, it seems like LFD doesn't work with nginx (?)

Re: nginx and csf

Posted: 29 Jun 2013, 12:01
by lpa
So, LFD still does not work with Nginx? Is it?

Re: nginx and csf

Posted: 20 Nov 2013, 08:11
by johnang
Any news on nginx support? Thanks.

Re: nginx and csf

Posted: 21 Mar 2015, 22:56
by websnail
darkroast wrote:..but I get the following message
atlanta lfd[23996]: STATS: Unable to retrieve Apache Server Status [http://127.0.0.1/whm-server-status?auto] - Unable to download: Not Found
Just as a side note to fix this issue you can do the following:

Re: nginx and csf

Posted: 06 May 2015, 09:05
by Karel
Any progress on support for nginx?
DA file locations:
/var/log/nginx/error_log
/var/log/nginx/domains/*.error_log

Re: nginx and csf

Posted: 21 Nov 2015, 17:55
by blindpet
Found this on Google and was hoping to find nginx support. I'd rather not have to use fail2ban on top of the awesome CSF, where can one contribute code to add functionality?

Re: nginx and csf

Posted: 23 Nov 2015, 09:52
by marcele
CSF already supports nginx.