Waf rules issue

My computer has both IPv4 and IPv6 addresses. I want to add rules that only allow specific IP addresses to access certain pages. When I set the rule as

(http.request.uri contains "nginx_log" or http.request.uri contains "wp-admin" or http.request.uri contains "wp-login") and not ip.src in {2408:824e:1501:f390::/64}

I can access normally. But when I set the rule as

(http.request.uri contains "nginx_log" or http.request.uri contains "wp-admin" or http.request.uri contains "wp-login") and (ip.src ne 183.94.150.107 or not ip.src in {2408:824e:1501:f390::/64})

I cannot access.

Assuming the rule is to block or challenge, then this…

(ip.src ne 183.94.150.107 or not ip.src in {2408:824e:1501:f390::/64})

…should be…

(ip.src ne 183.94.150.107 and not ip.src in {2408:824e:1501:f390::/64})

(since using OR, that statement woud always be true)

…or easier…

(not ip.src in {183.94.150.107 2408:824e:1501:f390::/64})
2 Likes

I understand now, thank you very much for your explanation

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.