Forum Discussion
muzammil_88686
Nimbostratus
Nov 12, 2012Blocking Multiple URLs
Guys,
I want to block the below two URLs using iRule and also I want to log the dropped connections for both the URLs.
/xyz*
/abc
Could you pls let me know wh...
What_Lies_Bene1
Cirrostratus
Nov 12, 2012Something like this should work;
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
"xyz*" {
drop
log local0. "Dropped access attempt to [HTTP::uri] from client [IP::client_addr]" }
"/abc" {
drop
log local0. "Dropped access attempt to [HTTP::uri] from client [IP::client_addr]" }
default {
return }
}
}
You can use 'reject' instead of 'drop' if you want to actually close the client connection.
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
