Mike_Graston_10
Feb 22, 2007Nimbostratus
restricting source IP's based on uri content
All,
I have been racking my brain for two days now and have read back on this list since middle of last year and still can't figure out how to combine two pieces of logic with an and statement. I have setup a data class for allowed IP addresses and also filtered on a string in a uri but need to do them both. I have the below script and continually get syntax. I tried it about 100 times.
when CLIENT_ACCEPTED {
if { [string tolower [HTTP::uri]] contains "login"} {
if { not [matchclass [IP::client_addr] eq [$::private_IP]]} {
discard}
}
Seems simple enough, I tried using an and command an or which won't help, What I need to do is any request going to my login.asp page is only allowed from my internal addresses defined in my private_IP pool???? Any help at this point would be appreciated!!!