Forum Discussion
Allowing a user-agent by iRules
Hi All,
I do not want to white-list an IP address as it is dynamic, but this dynamic IP address is pen testing our network.
Thus i want to allow a specific user-agent to be able to bypass the ASM policies for pen testing.
Will the below irule do the job?
when HTTP_REQUEST { if {[HTTP::header "User-Agent"] contains "MyAgent_Allow" } { return } else { drop } }
Regards
Hussein
- Hussein_GhazyNimbostratusan update to the iRule: when HTTP_REQUEST { if {[HTTP::header "User-Agent"] contains "MyAgent_Allow" } { asm::disable } else { asm::enable } }
- Tzoori_Tamam_95Historic F5 Account
You can use Local Traffic Policies in order to achieve just that, if you want to avoid iRules.
Hi Hussein,
the
iRule looks valid to me. So it should work... 😉{ asm::disable } else { asm::enable }
Cheers, Kai
- Hussein_GhazyNimbostratusCan i do something like IP whitelising to the user-agent, in order not to disable the ASM.
- Santhosh_K_S_28Nimbostratus
Please can you update if this worked.. we have a similar situation for a pen testing
when HTTP_REQUEST { if {[HTTP::header "User-Agent"] contains "MyAgent_Allow" } { asm::disable } else { asm::enable } }
Recent Discussions
Related Content
* 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