Private Network does not work.

March 16, 2018 1.4k views
Networking Ubuntu

Private Networking does not work.

I created two droplet. A and B. All from scratch and Private IP enabled.

When I ssh into A, ping to Private IP of B fails. When I ssh into B, ping to Private IP of A fails.

I've followed the tutorial provided: How To Set Up And Use DigitalOcean Private Networking and it still fails. I have removed all the rules from firewall and it still fails.

Here is what I get when I ping:

$ ping PRIVATE_IP
PING PRIVATE_IP (PRIVATE_IP) 56(84) bytes of data.
From PRIVATE_IP icmp_seq=1 Destination Host Unreachable
From PRIVATE_IP icmp_seq=2 Destination Host Unreachable
From PRIVATE_IP icmp_seq=3 Destination Host Unreachable

Note that pinging the public ip works. But I am setting up a private network in NYC1 datacenter and it doesn't help.

This is on a Ubuntu 16.04 LTS droplet.
Also all the droplets are created from the same Digitalocean account.

2 Answers
iamottomon March 18, 2018
Accepted Answer

Interestingly, when I ran arp -an it showed this:

? (OTHER_PRIVATE_IP) at <incomplete> on eth1

I talked with support and the told me to manually add the private ip and hwadress of the other droplet. So I ran the following:

arp -s <OTHER_PRIVATE_IP> HWAddr

I ran it on each of the droplets with the other machines ip and hwaddr (found using ifconfig). Now pinging the machines works!!!

  • i have a similar issue, so i set this while I ssh into A
    arp -s <machine B private ip> <machine B mac address>

    and in machine B I set
    arp -s <machine A private ip> <machine A mac address>

    still not working.
    Mind to share what else do you need to set for iptables for private network?
    Thanks

    • Maybe you set the wrong private ip(just like me haha). DO have an option to enable ipv4 and you can get the private ip there.

What does your routing table show.

netstat -rn
Have another answer? Share your knowledge.