Forum Discussion
hooleylist
Mar 05, 2012Cirrostratus
Hi Joe,
Are you sure about the 404? The iRule should either send a 403 or send the request to the VS default pool. I don't see how LTM could cause a 404 here either by rewriting the request or selecting the wrong pool.
Though you are missing a space between matchclass and the client IP in the last three switch cases. That should cause a runtime TCL error and TCP reset being sent to the client.
Also, you could combine the four URIs into one switch action like this:
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::path]] {
"/grda*" -
"/grsupport*" -
"/grreg*" -
"/grrt*" {
if {not [matchclass [IP::client_addr] equals grs_access]}{
HTTP::respond 403 content {Blocked!}
}
}
}
}
Aaron