Forum Discussion
mbamusa_59409
Oct 16, 2012Nimbostratus
Geolocation Irule
Hi All ;
i have the following irule :
when CLIENT_ACCEPTED {
if {[ whereis [IP::client_addr] country] eq US ] or [IP::addr [IP::client_addr] equals 10.7.10.1]}
...
nitass
Oct 16, 2012Employee
e.g.
root@(ve11a)(cfg-sync Changes Pending)(Active)(/Common)(tmos) root@(ve11a)(cfg-sync Changes Pending)(Active)(/Common)(tmos) list ltm rule myrule
ltm rule myrule {
when CLIENT_ACCEPTED {
set allowed 0
if { [class match -- [whereis [IP::client_addr] country] equals country_list] or \
[IP::addr [IP::client_addr] equals 10.7.10.1] } {
set allowed 1
}
}
when HTTP_REQUEST {
if { $allowed } {
do something
} else {
do something
}
}
}
root@(ve11a)(cfg-sync Changes Pending)(Active)(/Common)(tmos) list ltm data-group internal country_list
ltm data-group internal country_list {
records {
SG { }
US { }
}
type string
}
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects