403 errors returned from any page accessed on my web site

I’m having trouble with an ASP.NET site that has previously run fine with Cloudflare. We had to change the Host and the new host has updated DNS records as required by Cloudflare. It was running fine for a few days but something must have changed somewhere and now it causes 403 when accessed.

If I pause the Cloudflare site, everything works fine. If I resume Cloudflare, any page I access gives 403 Access Denied. It WAS working OK but this seems to have happened recently.

I can’t think of any reason for this but if it can’t be resolved we’ll have to leave Cloudflare.

Do you see any Firewall event logs? If there is can you post a screenshot?

If there are no Firewall event logs, then it’s likely your host or site configuration.

Thanks for the response. I’m not familiar with “Firewall event logs” and I don’t know if you mean logs in Cloudfare or on my machine. I can’t see how it could be a host config problem when it works perfectly if Cloudflare is disconnected. Obviously, I have told the host about it but, for him, everything is working fine… Is there any way to do a complete reset of Cloudflare back to default settings? I s’pose I could cancel the account and open a new one, but that seems a bit excessive… Please clarify regarding logs. Thanks.

On the firewall tab of the Dashboard https://dash.cloudflare.com/?to=/:account/:zone/firewall you can find all events that Cloudflare firewall blocked for your domain. On the Cloudflare error page there will be a “Cloudflare Ray ID”, and you can use that to filter for the exact request that was flocked.

You might have an IP access control list on your web server that is looking at the request coming through Cloudflare, but filtering on the Cloudflare IP address, and not the end users IP address.

If all you did was change the Origin IP address, I would tend to suspect a mis-configuration on the new Origin server. Check the IIS logs (normally in %SystemDrive%\inetpub\logs\LogFiles) to see if the 403 is logged there.

Can you share a URL, or a screenshot of the error page?
In IIS have you enabled “Require SSL”, and what is your Cloudflare SSL/TLS Encryption Mode (Found here: https://dash.cloudflare.com/?to=/:account/:zone/ssl-tls)

From Cloudflare Dashboard, click Firewall and you will see actions listed there. If the Cloudflare is blocking anything, it will be listed there:

However, I really suspect your server is returning 403 Forbidden - see the reply above.

Thanks very much. I checked the firewall and there is nothing. I don’t have control over IIS as the site is hosted. I’m looking through the things you suggested and really appreciate your clarity. Will pass this thread to the Host…

Hi Michael,

Thanks for your response.

If I disconnect Cloudflare I see what is expected:
The same URL, with Cloudflare connected returns this:

Thanks. That is an IIS error page, not a Cloudflare error page.

Based on what I can see, your SSL/TLS mode is probably set to Flexible. Can you confirm? Setting to Full (Strict) should resolve.

% curl http://primacomputing.co.nz --connect-to :: --dump-header - --silent | grep HTTP
HTTP/1.1 403 Forbidden
% curl https://primacomputing.co.nz --connect-to :: --dump-header - --silent | grep HTTP
HTTP/1.1 302 Found

Your hosting will have to sort out the server side - it looks like you get the 403 response on HTTP but not in https.

To me this indicates that the IIS Binding to port 80 is incorrect. Once it’s fixed and working you should also change settings within IIS to redirect to HTTPS - something like a rewrite rule will do it: IIS Redirect HTTP to HTTPS – Quick steps for enable HTTPS in IIS (aboutssl.org)

Changing the Cloudflare SSL mode to Full(Strict) will not solve this. Follow the steps above.

Hi Michael,

Yes, it is set to flexible. That is what the Cloudflare tool recommended and when I used “Full” I got a problem with SSL/TLS. I’ll try it again with full… did that and put it back online. Waited 6 minutes to give it time to recognize the change and tried it again. It worked! This is pretty good and I am grateful for your help. If the previous problem comes back I’ll post here. Meanwhile, many thanks. I’ll give it a day or so, then close this if it is still working OK.

Hi Freitasm,

The redirection is already in place and I was able to refresh it. At the moment, everything is working fine (both the site AND Cloudflare, so I am keeping fingers crossed. Thanks again for your help.

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