Forum Discussion
Nick_Palmer_f5
Nimbostratus
Oct 24, 2013Blocking a HTTP Verb/Method
Hello!
Could you please help me come up with a solution on suppressing/blocking a HTTP verb? Will iRule be a good option for this? A site we host was scanned by client which showed the TRACE method was allowed.
Thank you for your help/advice.
3 Replies
- Kevin_Stewart
Employee
It might be better to use a data group so you can manage multiple verbs without complicating the iRule:
when HTTP_REQUEST { if { [class match [HTTP::method] equals disallowed_verbs] } { log local0. "Attempt by [IP::client_addr] with a forbidden HTTP verb: [HTTP::method]" reject } }disallowed_verb string data group:
PUT := 1 TRACE := 1 DELETE := 1 - Kevin_Stewart
Employee
That should work, and you can actually shorten it:
when HTTP_REQUEST { if { [string tolower [HTTP::method]] equals "trace" } { log local0. "Attempt by [IP::client_addr] with a forbidden HTTP verb: [HTTP::method]" reject } } - Nick_Palmer_f5
Nimbostratus
I do appreciate your help, Kevin! Thanks!
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