Direct IP access to site works even though domain is proxied

My domain tonerandinkfactory.ie is proxied through Cloudflare DNS. My issue is that access is somehow available to the site via 178.128.41.89:443.

178.128.41.89:80 automatically redirects to my domain, but 178.128.41.89:443 is browseable as if 178.128.41.89 were the domain.

I’m using Apache with LetsEncrypt SSLs, and don’t have any enabled configurations that are specifically for 178.128.41.89 - my only enabled site configs are for tonerandinkfactory.ie, and tonerandinkfactory-le-ssl.ie.

Is the Cloudflare proxy supposed to disable access to the site when accessed via 178.128.41.89:80 and 178.128.41.89:443? Is it supposed to redirect the :80 one?

Cloudflare has nothing to do with direct connections to your server via IP address. You would have to set up a firewall at your host to block any traffic that doesn’t come from the list at cloudflare.com/ips

I’ll try to do that so. I was attempting an Apache virtual host leading to a blank index.html page for 178.128.41.89 but it seemed to break my site and I couldn’t figure out why. I’ll look around a little harder.

Would blocking any traffic that doesn’t come from the list at cloudflare.com/ips stop my server from contacting itself do you know?

It shouldn’t. If your server contacts itself via hostname, it will be routed through Cloudflare. If it wants to contact itself via IP address, it should use 127.0.0.1 which won’t be affected.

1 Like

Perfect, thank you for that information, it may be useful to me in the future to diagnosing any issues.

Thank you for your time sdayman!

1 Like

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