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 content on virtual server)
- and block other access, not allow to access to "https://abc/XXX" (XXX for others mappings)
thank you.
- Dario_Garrido
Noctilucent
Hello 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.
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