Forum Discussion
ukitsysadmin_95
Nimbostratus
Feb 22, 2013drop any request that has a '~' in it
Hello all
Whats the best way to right an irule that will drop any request that has '~' in it and logging the url that person has hit
regards
jim
5 Replies
- What_Lies_Bene1
Cirrostratus
This should cover it;when HTTP_REQUEST { if { string tolower [HTTP::uri] contains “~” } { Drop the request and send a TCP RST to the client log local0. “Rejected request for [HTTP::host][HTTP::uri] reject } else { Stop processing the iRule for this event here return } } - What_Lies_Bene1
Cirrostratus
Correction (was missing some []);when HTTP_REQUEST { if { [string tolower [HTTP::uri]] contains “~” } { Log the requested URL for reference log local0. “Rejected request for [HTTP::host][HTTP::uri] Drop the request and send a TCP RST to the client reject } else { Stop processing the iRule for this event here return } } - What_Lies_Bene1
Cirrostratus
Arrgghhh. Missed a " at the end of the log statement;when HTTP_REQUEST { if { [string tolower [HTTP::uri]] contains “~” } { Log the requested URL for reference log local0. “Rejected request for [HTTP::host][HTTP::uri]” Drop the request and send a TCP RST to the client reject } else { Stop processing the iRule for this event here return } } - ukitsysadmin_95
Nimbostratus
Hi Steve
thanks for that will test this next week
have a good weekend
Jim - What_Lies_Bene1
Cirrostratus
You're welcome, you too.
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