Firewall rule not working for subdomain

Hi, I am currently testing a simple firewall rule for a subdomain. The subdomain is an A record pointing to a specific IP address and it is proxied through cloudflare (so I have the orange cloud icon on). The firewall rule is:

(http.host eq "subdomain.example.com" and ip.geoip.country in {"IE" "US"})
Then Block

I’m based in Ireland, so testing it should be easy. It should block my request to my subdomain server. I have also given the rule a high priority to ensure other rules don’t effect first. I logged a support ticket with cloudflare. I added US to the rule, so cloudflare support based in the US could also verify that the rule does not work. They verified that the rule isn’t working and have escalated the ticket, but I have had respond from them in over 2 days. Has anybody had issues with firewall rules on subdomains or see anything I should change to make the rule work?

Thanks in advance,
Stephen.

My sub-domain is added to the DNS tab of Cloudflare Dashboard.
Also have content on it.
Nevertheless, it is too :orange: (proxied) the same as you stated.

I used for testing purpose:

(http.host eq "sub.mydomain.hr" and ip.geoip.country in {"HR"})

With action “block” and as far as I am from Croatia, I got 1020 Access denied as it is supposed to be and working fine.

But, in which position that “block” rule actually is in your list of Firewall Rules?

Helpful article regarding Firewall Rules and fields:

May I ask you to post a ticket number here in a reply?

Hi Fritex,

It’s seems very strange that it won’t work for me. I’m wondering if it’s something to do with my specific country. It is the first firewall rule in the list and it appears first in the list if you switch the view to list by priority. I’ll have to just wait and see what cloudflare support come back with.

Thanks,
Stephen.

If you’ve already Allowed your IP address in Firewall → Tools (or in another Firewall Rule), I believe you can’t block yourself with a Firewall Rule.

2 Likes

Hi sdayman,

Yes I can see a Firewall Rule in Tools for Ireland and it allows all websites from Ireland to access, so that must be it.

Thanks,
Stephen.

1 Like

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