Forum Discussion

DaveC_53879's avatar
DaveC_53879
Icon for Nimbostratus rankNimbostratus
Nov 18, 2011

Restrict access by IP

I have an irule that I want to use to only allow certain IP addresses. I think what I have should work but it blocks all addresses to the specific URI. I'm running ver. 9.4.6

 

 

when HTTP_REQUEST {

 

if { ([HTTP::uri] starts_with "/protect") and ! ([matchclass [IP::remote_addr] equals $$My_Internal]) } {

 

HTTP::close

 

}

 

}

 

 

My_Internal equlas my IP addresses. Even if I put an IP in directly, 10.0.0.2, it blocks everything.

 

 

What am I missing here? I see lots of similar posts and I think this should work. Thanks in advance.

 

 

11 Replies