Forum Discussion
laga44_77816
Nimbostratus
Aug 07, 2008blocking content with iRules
Hi, I'm looking for a sample to block a specific
parameter from a http request URL query string.
As an example is someone hits our site with
http://test.test.11/dir/1315...
laga44_77816
Nimbostratus
Aug 08, 2008thank you.. when I run this script, I get
01070151:3: Rule [sql_injections] error: line 1: [undefined procedure: class] [class Hosts { host 10.5.5.2 host 10.5.5.3 }]
here is my irule.
----------
class Hosts {
host 10.5.5.2
host 10.5.5.3
}
class badStrings {
";declare"
";select"
";insert"
";update"
";delete"
";exec"
";sp"
" " " " }
when HTTP_REQUEST {
if { [matchclass [IP::server_addr] equals $::Hosts]} {
if { [matchclass [string tolower [HTTP::uri]] equals $::badStrings]} {
log local0. "Dropping URI: [HTTP::uri]"
drop
}
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
