Jason_19901
Nimbostratus
Apr 05, 2011iRule Help
I am trying to create an iRule to look at the URI and then based on IP address, either allow or deny. Any help would be great!
Thanks
Thanks
http://devcentral.f5.com/Community/GroupDetails/tabid/1082223/asg/52/aft/1178546/showtab/groupforums/Default.aspx
http://devcentral.f5.com/Community/GroupDetails/tabid/1082223/asg/50/aft/1178517/showtab/groupforums/Default.aspx
The final iRule described here seems close. If this isn't it, let me know.
It does implement Data Groups to allow for multiple IP Addresses, etc.
Here is a static example. Perhaps you can combine pieces of the two to get exactly what you are needing.
when HTTP_REQUEST {
if { [[string tolower [HTTP::uri]] starts_with "/website/login.aspx" ] and [IP::addr [IP::client_addr] equals "192.168.1.10"] } {
pool matching.pool.name
}
else {
pool nonmatching.pool.name
}
}