I have hosted my WordPress site on DigitalOcean Droplet along with Cloudflare. I am trying to integrate Ezoic with it. But after integration, I am getting Error 502 whenever I am trying to visit my website. When I contacted Ezoic, they told me that I have to whitelist Ezoic IPs in my host i.e. DigitalOcean. They told me that my connection is a proxy NameServer connection i.e. in my case, my Name Servers are with Cloudflare, and a reverse proxy with Ezoic is present. Can anyone help in solving this issue because I am new to all this? Can you tell me how to whitelist IPs in DigitalOcean droplet with WordPress?
The server is Apache2
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 @hellohello589,
You can whitelist IP addresses on your Droplet using IPTABLES. Good thing is DigitalOcean have a pretty good tutorial on how to work with IPTABLES. Here is the article:
For instance, if you wish to allow an IP address to your firewall you can se use the following commands
iptables -I INPUT -p tcp -s XXX.XXX.XXX.XXX -j ACCEPT
iptables -I OUTPUT -p tcp -d XXX.XXX.XXX.XXX -j ACCEPT`
Please note you need to change XXX.XXX.XXX.XXX with the actual IP addresss. Additionally, the above commands will allow access to every port for the given IP Address.
If you want to give access only to IP only on a specific port, you can use
iptables -I INPUT -p tcp -s XXX.XXX.XXX.XXX tcp --dport 80 -j ACCEPT
Regards, KFSys
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.