Forum Discussion
adiezma_1656
Nimbostratus
Jan 16, 2012iRule for access to two ip addresses to a URI
Hi!
I am looking for
a way to make
a irule.
Problem:
I need
a irule that
only allows access
to two IP addresse...
hoolio
Cirrostratus
Jan 16, 2012Hi,
If you define an address data group named allowed_clients_dg with the two IP addresses, you can use an iRule like this to block requests to a specific URI made from clients not in the data group:
when HTTP_REQUEST {
Check for requests to the restricted URI
if { [HTTP::uri] starts_with "/abc/dfg/"} {
Check if the client IP is not in the allowed clients data group
if {![class match [IP::client_addr] equals allowed_clients_dg]}{
Send a 403 response
HTTP::respond 403 content {blocked!
Aaron
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