Source ip page with cloudflare

Hello, how can I protect the origin IP of my server, for example If a user tries to access my server via, they should receive an error. How can I achieve this? I’ve tried going into the WAF settings and creating a rule: Rule > Origin IP >, then set it to block. However, nothing happens. I’ve seen many sites online where if you try to access their server IP, a page is displayed as shown in the picture.

How can I do the same thing on my server? Thanks to whoever will help me.

That can’t be done through Cloudflare as any requests to your IP address go direct to your server.

If all requests to your webserver will be proxied (and therefore pass through Cloudflare first), you can do either or both of:

This only applies to HTTP traffic, other protocols can’t be proxied through Cloudflare (unless using Cloudflare Spectrum) so will still be exposed (mail, FTP, etc).

The page you showed above is what you get when requesting direct access to a Cloudflare IP address (since that should always be requested with a host header).