Forum Discussion
netw
Nimbostratus
Apr 21, 2024Irule for Host block with custom ASM violation
Dears, I have following scenarios, 1. if Traffic from Internal user/IP --- > Allow connection 2. Traffic from internet 2.1) Block access only on Host name ( URL ), That is -----> https://XYZ...
JRahm
Admin
Oct 15, 2024when HTTP_REQUEST priority 500 {
if { ([IP::addr [IP::client_addr] equals 10.0.0.0/8]) || ([HTTP::host] == "xyz.com") } {
return
} else {
HTTP::respond 403 content "Access Denied"
}
}
Strictly with an iRule, this should be close to what you need to allow requests from 10/8 to any host or require host xyz.com. If you have ASM, you can configure this in the policy and you shouldn't need an iRule at all.
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
