Report this

What is the reason for this report?

How should I setup iptables for private network

Posted on September 29, 2018

I am trying to connect my react app with a wordpress backend as rest api. Previously I’ve tested with both droplet’s public ip. I setup a self signed certificate for the wordpress droplet. It works except my browser need to first connect to the wordpress droplet public ip and accept the certificate before the front end app can send any authentication data.

Now I need them to talk to each other with private network and I removed the self signed certificate in wordpress droplet and received “net::ERR_CONNECTION_TIMED_OUT” in my browser console. In order to connect with each other. How should I setup the iptables for private network on both droplets.

Do I need to setup incoming and outgoing with port 80 and 443(assume I will get let’s encrypt later) for both droplets or I just need outgoing on front end and incoming on wordpress droplet?

I am using vpn and access my react app with private ip.

I’ve asked do support and someone reply me to use their load balancer. = =



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!

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.

My bad, the real issue is CORS been blocked. Will try to change the domain inside wordpress and see what’s happen.

The best idea is to block all ports except 443 and 80 and block all incoming Ip addresses except your IP and all that behind your CDN. This tutorial might help you about iptables rules: iptables firewall Regards,

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.