Forum Discussion
giltjr
Mar 21, 2015Nimbostratus
What I have, which I think I got from DevCentral: For the IP addresss you can block based on a specific IP address (/32) or subnets (/12, 24, /whatever)
when RULE_INIT {
set static::AccessDenied "Whatever you want to say when you deny access. "
}
when HTTP_REQUEST {
if { [IP::addr [IP::client_addr]/12 equals 172.16.0.0]
or [IP::addr [IP::client_addr]/24 equals 172.168.1.0]
or [IP::addr [IP::client_addr]/32 equals 1.1.1.1] } {
} else {
HTTP::respond 200 content $static::AccessDenied ; return
}
}