By johnaraon
So the thing is when i go to an online website ip finder type website and find my website’s IP address and search for it cloudfare says direct ip access not allowed but when using droplet ip does not work. How can I deny all other traffic than what originates from cloudflare in my firewall to make that happen for droplet ip too?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi @johnaraon,
How I would approach this is denying access to your website from any other IP addresses directly in your configuration file on your Droplet. Basically, in your WebService (Apache/Nginx) you can deny access from all IP addresses except CloudFlare’s ranges.
If you let me know which WebService you are running, I can provide with some more pointers on how to do so.
Regards, KFSys
@KFSys is spot on but here is some info.
Sounds like this reference may be what you’re looking for.
https://support.cloudflare.com/hc/en-us/articles/201897700-Allowing-Cloudflare-IP-addresses
https://support.cloudflare.com/hc/en-us/articles/217074967-Configuring-IP-Access-Rules
Those two links will probably give you all you need to know but here is some info about using ufw.
This will tell you how to use the deny all and allow from commands to do just what you’re looking for. :)
Also if you have csf instead of ufw here is some info.
https://download.configserver.com/csf/readme.txt
Hope this helps!
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.