Forum Discussion
Gill_32697
Nimbostratus
Nov 25, 2013irule to permit url by external host,
Need to write an irule that will permit two public IP's to specific uri, but still allow all other access to site. For example... Public facing access to VIP" 10.1.1.100 (https://mysite.com) But if y...
tiny_cloud_ninj
Nov 25, 2013Historic F5 Account
This is a short replacement for a URI ACL. This iRule has one iRule Data Group List which contains the URI in question with a value of the allowed IP Addresses. So each listed URI can have predefined number of IP Addresses allowed.
when HTTP_REQUEST {
if { [class match [string tolower [HTTP::path]] starts_with URL_paths] } {
set ip_access_datagroup [class match -value [string tolower [HTTP::path]] starts_with URL_paths]
log local0. " filter $ip_access_datagroup"
if { ![class match [IP::client_addr] equals $ip_access_datagroup]} {
log local0. " IP Adress deny"
HTTP::redirect "https://mysite.com"
}
return
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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