Forum Discussion
sandy16
Altostratus
Apr 28, 2015Access to VIP by irule for matching a header value OR allowing ips using data-group
Hi experts, we have a requirement in writing an irule that only allows access to the VS when it matches a certain hexa-decimal value in the http_header, example value ='3196E8D30330CA17238FAS013036'....
sandy16
Altostratus
Apr 28, 2015thanks, so I have done this (added the pool default and else for drop) but it gives me some errors in the GUI -
when HTTP_REQUEST { Check if http_header contains hex code or the client IP is not in the allow list if { !([HTTP::header "name_of_header"] equals "3196E8D30330CA17238FAS013036" or [class match [IP::client_addr] equals WHITELIST])} { pool default else { if neither value matches drop traffic drop } }
- DEJApr 28, 2015
Nimbostratus
Hello S, I've updated the iRule a bit. My apologies but I'm pretty much free-handing this iRule (left my laptop at work). A few questions. 1. What header will contain the hex value you are matching against? 2. Have you already created the datagroup you will be using in this iRule? 3. Try the edited code in my original reply. If you still get a GUI error, please post the error.
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