Forum Discussion
Requesting Assist with iRule Please
- Mar 09, 2022
Hi there,
The K31914583 article assumes that you have created a data group. In your example above that data group would be called Netsparker. Also is the header name x-scanner or x_scanner?
Seeing as you are only after one value I would not use the data group.
You can use an irule to do this for you such as below,
when HTTP_REQUEST { if { string tolower [HTTP::header "X-Scanner"]] contains "netsparker"] } { drop } }
or you may want to look at using a traffic policy to do this for you, something like this. You can also include additional actions such as logging to the policy.
Don't forget to apply the irule and/or policy to your VS, make sure you test this before applying to production traffic.
Good luck
Mark
Hi there,
The K31914583 article assumes that you have created a data group. In your example above that data group would be called Netsparker. Also is the header name x-scanner or x_scanner?
Seeing as you are only after one value I would not use the data group.
You can use an irule to do this for you such as below,
when HTTP_REQUEST {
if { string tolower [HTTP::header "X-Scanner"]] contains "netsparker"] } {
drop
}
}
or you may want to look at using a traffic policy to do this for you, something like this. You can also include additional actions such as logging to the policy.
Don't forget to apply the irule and/or policy to your VS, make sure you test this before applying to production traffic.
Good luck
Mark
Thank you so much! I appreciate the review and new info.
Recent Discussions
Related Content
* 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