Forum Discussion
Nitesh_Saxena_3
Feb 28, 2018Nimbostratus
client based restriction
Hi,
I am trying to implement something very simple but i am not sure which is best way of doing.
I need to restrict user with certain ip address to access sites /uri or sites.
Example:-
all...
JG
Mar 01, 2018Cumulonimbus
when HTTP_REQUEST {
if { [IP::addr [IP::client_addr]/16 equals 192.168.0.0] } {
return
}
if { [string tolower [HTTP::host]] equals "www.abc.com" } {
switch -glob -- [string tolower [HTTP::path]] {
"/abc1/*" -
"/abc2/*" {
return
}
default {
reject
}
}
} else {
reject
}
}
(Untested).
[Edited].
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