Forum Discussion
hooleylist
Jan 27, 2012Cirrostratus
Which LTM version are you on? You can check in the GUI under System | General Properties | Version. If you're on 9.4.4 or higher, you can use this
9.4.4 - 9.4.8
when HTTP_REQUEST {
Check the requested path set to lower case
switch -glob [string tolower [HTTP::path]] {
"/bac*" {
Path started with /bac so check if client IP is in the allowed_hosts_dg data group
if {not [matchclass [IP::client_addr] equals allowed_hosts_dg]}{
Send a 403 unauthorized response
HTTP::respond 403 content {Blocked!}
Or you could reset the TCP connection
reject
}
}
}
}
9.4.3 and lower
when HTTP_REQUEST {
Check the requested path set to lower case
switch -glob [string tolower [HTTP::path]] {
"/bac*" {
Path started with /bac so check if client IP is in the allowed_hosts_dg data group
if {not [matchclass [IP::client_addr] equals $::allowed_hosts_dg]}{
Send a 403 unauthorized response
HTTP::respond 403 content {Blocked!}
Or you could reset the TCP connection
reject
}
}
}
}
Aaron