I’m thinking of doing Setup #2 but would like to restrict database server access. Im thinking I can, in theory, simply SSH from application server to database server to maintain db.
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.
What I’ve found easiest when using Terraform is creating a firewall along with every “private” droplet to allow connections only from select IP ranges, the IP range of your VPC for instance.
as mentioned before you can disable eth0 and use private network to access your droplet. you have 2 options:
here you just delete eth0 cfg block.
This comment has been deleted
Any droplet you create will be assigned a public IP address but you could disable the public interface or restrict traffic once it is created. There are a few ways to do this:
1.) You can set up an iptables or ufw firewall to drop all traffic to your public IP
2.) You can use the command
to disable the public network on a one-time basis.
3.) You can comment out the configuration for the eth0 interface in your droplet’s /etc/network/interfaces file.