Report this

What is the reason for this report?

Use Netbird VPN to connect across DO private network

Posted on January 1, 2025

I have multiple Ubuntu 24.04 instances hosted at DO. I have setup a Netbird infrastructure and added the public addresses of my DO droplets. I can connect to them without problems from the Internet.

I would like to configure the droplets so that when the communicate between themselves the VPN link will use the Private network provided by DO.

I have tried adding routes but this was not successful:

ip add route netbird_address via remote_droplet_private_address

Is it possible to achieve my goal?



This textbox defaults to using Markdown to format your 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.
0

Accepted Answer

Heya, @robert429b8ca91

Yes, this should be doable. Add a route to direct traffic for Netbird addresses through the private DO network. For example:

sudo ip route add <Netbird_Address> via <Private_IP_of_Target_Droplet>
  • Replace <Netbird_Address> with the VPN address of the remote droplet and <Private_IP_of_Target_Droplet> with its private IP.

  • If your Netbird setup includes a default route (e.g., 0.0.0.0/0 via the VPN), this may override your private network routing. To avoid conflicts:

  • Exclude the DO private network range (e.g., 10.0.0.0/8) from Netbird’s default route.

  • Update your Netbird configuration to include specific routes for other network traffic.

  • Ping the private IPs of your droplets to confirm that inter-droplet communication uses the private network:

ping <Private_IP_of_Remote_Droplet>
  • Use traceroute to check the path taken by packets:
traceroute <Netbird_Address>

You can then temporarily disable the Netbird VPN or private network on one droplet to ensure the fallback to the appropriate route.

Hope that this helps!

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.