also we can show them in real time if we want to (selecting the last 10 visits for example)
The basic architecture is depicted in the following diagram
I count the ip addresses for one url and if it reaches certain threshold then i will trigger
an action (iptables) or deny access directly from lua (mod_sec rule)
I have a basic simple select example for lua and firebird database just to get a idea how it will look and how easy is to write one, also is good to test if lua + firebird installation is ok
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local fb = require 'fbclient.class' | |
local at = fb.attach('localhost:/var/lib/firebird/2.1/data/firedjango.fdb', 'SYSDBA', 'masterkey') | |
local sql = 'SELECT a.ID, a.FIRST_NAME FROM BOOKS_AUTHOR a where a.FIRST_NAME=?' | |
for st, id, firstname in at:exec(sql,'Jack') do | |
print(id, firstname) | |
end | |
at:close() |
First i have created a Security Rule Script in lua
2 comments:
Your post reminded me to send an example I had of using DBs from ModSecurity to the listserv. Please see my example which may interest you here: http://sourceforge.net/mailarchive/message.php?msg_name=AANLkTimfKnUkPm5f29OR%3DJWm3cgQaaTekAccdN3AkA2O%40mail.gmail.com
thanls i will check it out
Post a Comment