Databases server firewalls in a load balanced setup

October 7, 2014 808 views

So I am in the process of planning my setup and reading up on things to get started. One of the things I was going to do was/is use iptables to restrict communication between an LB server and the one or more API servers I would be running. Seems fair I think.

Then I got to thinking about how I would be using iptables on the database servers, and I thought this isn't really going to be feasible to update the iptables on all the database servers I have when, or if, I need to spin up a new API server.

So I was wondering if anyone had any tips when is comes to this type of firewalling problem or is it just a case of following the provided security tips from the relevant DB providers?

Just as a note I would using a MySQL, MongoDB and possible a Redis box.

1 Answer

The easiest way to get around having to continually update your rules would be to access your database server via the private network and set up iptables to block all connections on your public IP. This way any droplet you spin up in the region will be able to reach your database server but it will not be accessible via a public IP at all.

Have another answer? Share your knowledge.