Hopefully, someone can help me with this problem. From what I thought would be a simple expression doesn't seem to work as expected, therefore I have been struggling for days trying to figure this one out.
Here's my simple response policy
Obviously the names and address listed are fictitious...
HTTP.REQ.USER.IS_MEMBER_OF("TestDeny") && !CIP.EQUALS_ANY("allowip") || (HTTP.REQ.USER.IS_MEMBER_OF("TestDeny") && !CLIENT.IP.SRC.IN_SUBNET(10.0.0.0/24))
The first expression before the OR operator uses a pattern set of IP addresses "allowip" and AAA group of "TestDeny" which works without issue when the source IP has been added to the PATSET list. I would like to also check for a known allowed subnet and mask in the same response policy, but can't seem to get the next expression for CLIENT.IP.SRC.IN_SUBNET(10.0.0.0/24) to be evaluated correctly.
The policy action is set to show an HTML page with a JavaScript popup explaining the users access has been restricted, it then uses /cgi/logoff, and a custom logoff page to end their session. This all works when creating separate responder policy for each of the expressions listed, or when removing one from existing expressions from the same policy.
The problem begins when attempting to evaluate the second expression when combined with the or operator, it doesn't seem to want to validate the subnet. My guess is the first element returned "true" so it never looks at the next element in the expression.
My preference would be to have a defined subnet list such as the IP list in the same responder policy so that both are evaluated, but I can't seem to find the right get syntax to search for a subnet from a pattern list either. I tried creating an Advanced expression with the following to match on a list, that doesn't work either.
CLIENT.IP.SRC.IN_SUBNET + ""
The ultimate end goal is to prevent members of a AAA group from connecting to the VIP when the source IP or subnet can not be found on a list, or within the policy while still allowing all other users to connect without any applied restrictions. I am sure this question has been asked and answered 1000 times over.
Any help or suggestions would be greatly appreciated.
Learn more