New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Comments
Use allow/deny in the configs? You can reload the config without restarting nginx. Just have a file that you put in deny 1.2.3.4 to and include it.
I was thinking about that but it's messy because I would have to write a bash script to parse the logs, update the deny.conf, nginx -t && reload, unban the IPs after a set time period etc. Could become sloppy
May I ask what you are attempting to do? Is the traffic going through cloudflare?
I have a plan. I will create a script to edit nginx.deny.conf to be triggered from active response.
http://itscblog.tamu.edu/protecting-web-servers-with-ossec/
http://www.ossec.net/doc/manual/ar/ar-custom.html
Well if it is going through cloudflare just write a script to use there API.
http://www.cloudflare.com/docs/client-api.html
Good idea but i routinely disable cloudflare when they have their issues (500s)
You might be able to cobble something together with the nginx lua module: http://wiki.nginx.org/HttpLuaModule
(though it could be immense overkill and there could be a much easier solution)
/etc/conf.d/block.127.0.0.1.conf
Make the first line:
or something and do some bash and cron magic