I created a new droplet and checked the ‘private network’ box, not really knowing what it is for. I don’t need it on my droplet - how can I turn it off?
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.
In order to disable private networking from the command line, you need to edit the file /etc/network/interfaces
It will look something like this:
# This file describes the network interfaces available on your
# system and how to activate them. For more information, see
# interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth1 eth0
iface eth0 inet static
address 95.85.37.158
netmask 255.255.255.0
gateway 95.85.37.1
dns-nameservers 8.8.8.8 8.8.4.4
iface eth1 inet static
address 10.129.176.173
netmask 255.255.0.0
eth0
is the public interface, while eth1
is the private interface. Remove the sections about eth1
(highlighted above), and restart your droplet:
sudo shutdown -r now
I known this is a long procedure, but if you are in a hurry, maybe create a snapshot image of this droplet, delete this droplet, then create a new droplet from the image. This new droplet is by default without private network. This is what I have done.
Any one have a response to this?
Yes, there is no such option to disable private networking through cloud panel once it has been enabled. However, as @ericjswang mentioned, you can create a snapshot and create a new droplet out of that snapshot without enabling private networking during droplet creation. However, you will need to remember while enabling private networking at later stage, that there will be existing interface configuration details of previous droplet from which the snapshot was taken. So you can just update the new private IP if you are enabling private IP in future.
If you are using ubuntu 18.04 or later versions, then the network interface configuration will be present in the “/etc/netplan/50-cloud-init.yaml” and not on “/etc/network/interfaces”.
Once you open the configuration file “/etc/netplan/50-cloud-init.yaml” in the text editor, you will need to comment out the eth1 configuration (In my case it was eth1, but please check the interface which has private ip using ifconfig and comment the interface details out). Once you comment the interface details in the configuration file, save the changes and then reboot the droplet.
Once the reboot is completed and you are able to SSH into the droplet, then run ifconfig command which shouldn’t include details of the private network of the droplet.
I have the same issue too… There is no button to disable the private networking?? How to change the IP to the private network. I want to “ping” between droplets.
Tengo la misma duda
same here, also ams2
I have the same issue. There is no button to disable the private networking.
Click below to sign up and get $100 of credit to try our products over 60 days!
problem solved, thanks a lot… @asb this would be nice if we have turn off private network button on droplet panel :)
@imammubin I just added a new answer below. Check it out.
same here, also sgp1