Forum Discussion
Cleiton_Lobo_de
Nimbostratus
Sep 21, 2019Allow access to URI-based Internet specific URL
I am trying to develop an irule whereby access to a specific URL is allowed only when a specific URL is presented . The URL specifies abc.domain.com/marketplace must be available for external a...
Sep 21, 2019
Hi,
Can you try this iRule?
when HTTP_REQUEST {
if { [HTTP::host] equals "abc.domain.com"} {
if { not ([string tolower [HTTP::uri]] starts_with "/marketplace") } {
switch -glob [IP::client_addr] {
"10.*" -
"192.168.*" -
"172.16.*" -
"172.17.*" -
"172.18.*" -
"172.19.*" -
"172.20.*" -
"172.21.*" -
"172.22.*" -
"172.23.*" -
"172.24.*" -
"172.25.*" -
"172.26.*" -
"172.27.*" -
"172.28.*" -
"172.29.*" -
"172.30.*" -
"172.31.*" {
# log local0. "Host: [HTTP::host] Uri: [HTTP::uri] ClientIP: [IP::client_addr]"
}
default {
reject
}
}
}
}
else {
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
