Forum Discussion
hooleylist
Nov 09, 2006Cirrostratus
You can set up your hosts and networks in a class (datagroup in the GUI) and then reference that class in a rule. Here is an example:
class my_hosts_networks_class {
network 10.0.0.0 mask 255.0.0.0
host 192.168.0.100
}
rule filter_clients_rule {
when HTTP_REQUEST {
if { [matchclass [IP::remote_addr] equals $::my_hosts_networks_class] } {
pool http-pool
}
else {
HTTP::redirect "http://192.168.0.12/local_only.jsp"
}
}
}
You can either add the class in the GUI under iRules >> Datagroups, or edit the bigip.conf and run 'b load' to initialize the change.
Aaron