Forum Discussion
J_Saunders_4728
Nimbostratus
Jan 30, 2013Reject based on string in HTTP header
All,
I want the F5 to reject (or drop) packets that have specific string/text in the HTTP header. I found this:
when HTTP_REQUEST {
if { [HTTP::header exists Morfeus Sca...
Kevin_Stewart
Employee
Jan 30, 2013Try this:
when HTTP_REQUEST {
foreach header {Morfeus Scanner} {
if { [HTTP::header exists $header] } {
log local0. "Caught $header header"
reject
}
}
}
The [HTTP::header exists ] command just works on the name of the header, so if you want to capture a header with "Morfeus" or "Scanner" in the value you'll need to modify the iRule.
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