Stop people from accessing through IP.

July 30, 2018 305 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 domain.com
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:

https://www.cloudflare.com/ips/

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

Kind Regards,
Jarland

Have another answer? Share your knowledge.