Forum Discussion
doi_dsat
Nimbostratus
Jul 15, 2020Setup F5 big-ip irules to allow source ip to specific uri only and drop other access
I would like to know how to setup a irule to meet below requirement: if source ip equal to '1.2.3.4' allow access to "https://abc/def" only (abc is virtual server, def is data group mapping conten...
Dario_Garrido
Noctilucent
Jul 15, 2020Hello Doi.
Try this ->
when HTTP_REQUEST {
# reject user if source IP is not 1.2.3.4 and first path value is not included in DATAGROUP
if { ([class match [getfield [string tolower [HTTP::path]] "/" 0] neq DATAGROUP]) || ([IP::addr [IP::client_addr] neq 1.2.3.4]) } {
reject
}
}Regards,
Dario.
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