Forum Discussion
Reginald_Sible1
Nimbostratus
Feb 17, 2015iRule that compares user agent string to a regular expression...
Anyone famialiar with creating an iRule that compares user agent string to a regular expression...
Example-If string contains SQLmap, drop and write log record.
Anytime this tool/browser.etc. hits our server drop and log... no response
Please help..
2 Replies
- Eric_St__John
Employee
This wouldn't require regex, unless there is more to what you are trying to accomplish.
when HTTP_REQUEST { if { [ string tolower [HTTP::header User-Agent]] contains "sqlmap"} { drop log local0. "Client IP:[IP::client_addr] has been blocked with user agent :[HTTP::header User-Agent]" } }Code borrowed from other DevCentral post(s).
- Reginald_Sible1
Nimbostratus
Nothing more just want to block User-agent: sqlmap*" at all Internet perimeters
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