Cloudflare Firewall Logic AND OR XOR

firewall
#1

My brain keeps using OR but when I test it, Cloudflare actually needs AND to do what I want. I am very confused.

Please someone kindly explain the difference between AND and OR, and optionally XOR. With examples please.

#2

Have a search online for a break down of logical operators. Effectively AND means both must be true, OR means either can be true, XOR means one or the other must be true but not both.

People tend to get confused when using AND/OR with ‘not’.

1 Like
#3

Expression 1: IP is not in {1.2.3.4, 1.2.3.5}
Expression 2: Request Uri contain site/admin
Expression 3: ASN is not 12345

1 or 2 or 3, action block = nothing is blocked
1 and 2 and 3, action block = working

What am I missing?

#4

Impossible. If ANDing three conditions works, then ORing them also works.
Unless something is wrong with your OR rule syntax.

1 Like