Forum Discussion
Jinshu_134425
Nimbostratus
Dec 17, 2014Create an Irule action based on username
Hello Friends,
I am trying to create an irule which actions based on username provided.
below are the conditions:
internal users : all accesses are allowed. For the external customer...
Mahmoud_Eldeeb_
Cirrostratus
Dec 17, 2014I have same idea
when HTTP_REQUEST {
Internal users
if { [IP::addr [IP::client_addr] equals "10.91.0.0/16"] } {
Access allowed
} else {
switch [string tolower [URI::query "?[HTTP::query]" "username"]] {
"admin" {
HTTP::respond 200 Content {
Acccess denied for admin account on external access
}
return
}
"apple" {
if { not ([IP::addr [IP::client_addr] equals "172.65.0.0/16"]) } {
HTTP::respond 200 Content {
You are not on the proper subnet. Access denied.
}
return
}
}
}
}
}
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