kevinmc
By:
kevinmc

private networking between two droplets not working Ubuntu 16LTS

September 2, 2017 367 views
Networking Ubuntu 16.04

I had an existing instance of ubuntu (WordPress app ubuntu 16) running and I setup another droplet to move the DB.

On existing droplet I powered down and installed the private Networking option and powered back up.

On new droplet setup with private networking.

I was unable to connect to the mysql server so I disabled uff and checked to ensure it was down. Same on existing server.

eth0 public facing
eth1 private network

Pinging on eth0 works pinging on eth1 fails (this is on both machines)

Found this guide…

https://www.digitalocean.com/community/tutorials/how-to-enable-digitalocean-private-networking-on-existing-droplets

So following the guide for Ubuntu and Debian…

vim /etc/network/interfaces

As stated in post…

"You will see two main sections, each used to define the two active network interfaces. We will create another section at the bottom to describe the eth1 interface that will be used for private networking.”

The only thing I see is…

auto lo
iface lo inet loopback

And adding

iface eth1 inet static
address 10.132.84.55
netmask 255.255.0.0

And of course reboot

Results in nothing

The provided article to enable Private Networking is from 2013 so I am thinking that the default interface config file is loading from somewhere else? Something has changed?

If there is anyone that could help me wrap my head around this I would greatly appreciate it!!!!

IN addition the guide How To Set Up a Remote Database to Optimize Site Performance with MySQL is dated a bit using ubuntu 12.04 so i am not sure how relevant that is considering that i cannot get the servers to talk to one another on the private network. :(

1 Answer

There is a step missing in that guide.
You need to edit this file -

sudo nano /etc/udev/rules.d/70-persistent-net.rules

and add a line for your networking interface.
Usually if you perform sudo ifconfig -a you'll find an ethernet interface names as ens4 or ens3p2 or something that like that. That needs to be renamed to eth1. Copy it's HwAddr and add a line to the 70-persistent-net.rules in this format

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="0a:83:3f:62:be:86", NAME="eth1"
Have another answer? Share your knowledge.