Question

Can I create a droplet with no public IP?

  • Posted December 1, 2014

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.

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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:

  1. manually edit interfaces file in /etc/network/interfaces
sudo vi /etc/network/interfaces

here you just delete eth0 cfg block.

  1. simply disable eth0 from command line
ifdown eth0

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

ifdown eth0

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.