The firewall blocks all my requests

Posted November 4, 2019 1.9k views

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.

1 comment

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.

Submit an Answer
2 answers

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.


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