Forum Discussion
Lee_Sutcliffe
Nov 20, 2017Nacreous
You are using [IP::remote_addr] in the client side context, this will return the client IP, not the IP address of the destination (O345)
Additionally your datagroup contains stings and wildcards. Your iRule will not do a DNS lookup so you will always go into the else condition and go to the pool.
If you want to use domain names (requesting host header) to identify the destination, you should build your datagroup like this:
ltm data-group internal Office_redirect_string {
records {
onedrive.com {}
}
type string
}
And use an iRule like this:
when HTTP_REQUEST {
if {[class match [string tolower [HTTP::host]] contains o365_list]} {
node default_gw
} else {
pool Pool_BC
}
}