I have two droplets. The first is used for my frontend app and the second is used for my backend. I want to restrict my backend to my frontend but i cannot. I tried many way but not succes. I follow this tutorial -firewallsExample link My backend droplet restrict all requests
Thanks in advance.
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 @KDSys ,
Thanks you for your response. I forgot to say that my backend use Docker-compose. I allow all conections from frontend droplet but i want to restrict my backend droplet to my frontend droplet or my own network. I use nginx and Docker for my backend.
Thanks you
Hi @dmm2019,
If you wish for your frontend app to connect to your backend app, all you’ll need to do is allow all connections from the frontend droplet. The exact command is
iptables -I INPUT -p tcp -s XXX.XXX.XXX.XXX -j ACCEPT
iptables -I OUTPUT -p tcp -d XXX.XXX.XXX.XXX -j ACCEPT`
Just replace the XXX.XXX.XXX.XXX with your droplet’s IP address.
Regards, KDSys
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.