[Mod-security-rules] mod sec rule to execute lua script
Brought to you by:
victorhora,
zimmerletw
From: kinomakino <kin...@ho...> - 2014-10-10 11:38:04
|
As always, thanks for the help. I'm playing with a lua script from mod security (exec: /var/scripts/script.lua) the target is ip ban in iptables source that triggers the rule. I get receive the REMOTE_ADDR variable, but I mod_sec alert appears: Message: Lua: Script execution failed: attempt to call a nil value The variable takes the script, because to write a test log. The lua script is as follows: Local remote_addr = m.getvar ("REMOTE_ADDR"); Local log_file = "/tmp/lua_tmp.log" file = io.open (log_file, "a") file: write (remote_addr) file: write ("\ n") file: close () print ("0") you have information about this error? Thank you !!! |