By Dan Mitchell
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.
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!
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.
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.