Forum Discussion
Rafish_129330
Nimbostratus
May 18, 2017irule to allow specific url and drop everything else base on src ip
Hello,
Need help to add some condition to work irule,
I have irule that deny access to uri that contains "admin" "login" and "mydb"
From all ip address except my ip
This the irule: (wo...
Jad_Tabbara__J1
Cirrostratus
May 18, 2017Hello,
Try this
when HTTP_REQUEST {
if {[HTTP::uri] contains "admin" || [HTTP::uri] contains "login" || [HTTP::uri] contains "mydb"} {
if {not[class match [IP::client_addr] equals my_ip_Address] } {
log local0. "dropped connection my ip address[IP::client_addr]"
reject
}
}
if { !(([string tolower [HTTP::host]] eq "site.domain.com") and ([HTTP::path] starts_with "/xxx/yyy/zzz")) } {
log local0. "rejected request [HTTP::uri] for client [IP::client_addr]"
reject
}
}
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