Ido_Katz_38061
May 05, 2010Nimbostratus
Help
Hi Guys,
1st of all I want to tell you that you got great community, you doing a great job!
2nd of all...I have a little problem that I'm sure that one of you can help me, I can't save ...
the following is a valid rule, does this achieve your requirements?
when HTTP_REQUEST {
if { [matchclass [HTTP::header exists "subscriberID"] equals $::subscriberID] } {
pool AA-BB-Pool
} elseif { [matchclass [IP::client_addr] equals $::XXX] } {
log local0. "Valid Source IP: [IP::client_addr] - forwarding traffic"
pool AA-BB-Pool
} else { HTTP::respond 301 Location "http://XYZ.com" }
log local0. "INVALID Source IP: [IP::client_addr] - dropping traffic" }
I am afraid that I have little experience in the use of classes, but to my eye this looks like it should do the job - I'm sure someone will correct my inaccuracies!
As you can see i have removed a couple of lines in an effort to make the rule more efficient (the http::respond command is surely only needed if we don't match the class for the subscriberID or the valid source IP?).
Thanks and good luck in your testing.