Stop people from accessing through IP.

July 30, 2018 837 views
DNS Ubuntu 18.04

I have a droplet with the public ip and ubuntu running apache.

I have cloudflare for ssl.

People access my website through
and it is secured.

But people can also access it through the public ip

How do I stop that?

1 Answer

Hello friend!

You can block all traffic to the web server in your firewall, and then allow traffic from these IP ranges:

This will ensure that your web server can only be reached through CloudFlare.

Kind Regards,

Have another answer? Share your knowledge.