Forum Discussion
cjg3000_192116
Nimbostratus
Sep 17, 2018filtering traffic with irule
Hello, I'm trying to create an irule that will only allow traffic to the VIP if it matches a specific header, all other traffic should be dropped. Is there an easy way to accomplish this?
- Lee_Sutcliffe
Nacreous
You can use an Local Traffic policy to do this:
Or a simple iRule:
when HTTP_REQUEST { if {!([HTTP::header exists "my-header-name"])} { reject } }
- Stanislas_Piro2
Cumulonimbus
Even if you request a Drop, I would suggest to send a 403 response page instead!
Take the lee’s Answer and replace reject with
HTTP::respond 403 content {put here the html content of your blocking page}
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