-2

I want to prevent browsing and access to my server "using the server's IP" and that the traffic of visitors is only through the cloudflare, is there any way to do that?

HATEM
  • 11

2 Answers2

1

Refer to this Digital Ocean guide covering this specific topic.

Note the line that states the following:

In the next section, you will set up Authenticated Origin Pulls to verify that your origin server is indeed talking to Cloudflare and not some other server. By doing so, Nginx will be configured to only accept requests that use a valid client certificate from Cloudflare; all requests that have not passed through Cloudflare will be dropped.

JG7
  • 196
  • 5
1

Block by IP range. Simple. It is not like Cloudflare is not publishing the list of IP ranges they use...

https://www.cloudflare.com/en-gb/ips/

(note: also accessible through their API).

Limit by that IP's, done.

TomTom
  • 50,857
  • 7
  • 52
  • 134