Question
How To: Whitelist CloudFlare IPs
When trying to setup Cloudflare DNS for SSL for my DigitalOcean Ubuntu server, I received a “Error 521” and started troubleshooting.
I found this article: https://support.cloudflare.com/hc/en-us/articles/200169166-How-do-I-whitelist-CloudFlare-s-IP-addresses-in-iptables-
And followed the steps until saving. Since there was no change, when I tested https://MyDomain.com, I didn’t bother saving the iptable entries.
Is there something I’m missing here??
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×
Which Cloudflare SSL method are you using? For example: Flexible, Full, Full Strict.
Whatever you recommend: I need to process credit cards on a donation form. I have it set to “Full” currently.
If you are using Full, you need to setup a SSL certificate on your server. Make sure port 443 is open by running the command:
iptables -A INPUT -p tcp -m tcp --dport 443 -j ACCEPT
Boom! done. Thanks again @MDS