Skip to main content
⚡ Calmops

Building Multi-Site Enterprise Networks with Open Source VPN Solutions

Introduction

Modern enterprises rarely operate from a single location. Your company might have a headquarters in one city, branch offices in others, remote employees scattered across the globe, and perhaps data centers or cloud infrastructure in multiple regions. Yet despite this geographic distribution, your employees need to access shared resources—file servers, internal applications, databases, and printer networks—as seamlessly as if they were sitting in the same office.

This is the fundamental networking challenge this article addresses: how do you connect geographically distributed employees and offices into a unified internal network using only open source solutions and the public internet?

The answer lies in overlay networks and virtual private networks (VPNs), technologies that have evolved significantly in recent years. This guide provides a comprehensive technical survey of the leading open source solutions, explains the underlying networking concepts you need to understand, and offers practical guidance for deploying these technologies in a multi-site enterprise environment.

The Core Challenge: Bridging Distance with Transparency

Imagine your company has offices in New York, London, and Tokyo. Each office has its own local network with multiple subnets, and each location has different internet service providers. Your goal is for an employee in Tokyo to access a file server in New York with the same speed and simplicity as accessing a local printer—with no manual VPN connections, no remembering to connect before accessing internal resources, and no awareness that their traffic is traversing the public internet.

This requirement distinguishes a true overlay network from traditional VPN solutions that require users to consciously connect and disconnect. In an ideal deployment, your internal network simply extends across locations transparently, with employees experiencing what feels like a single, unified local area network (LAN).

What Makes This Difficult

The public internet was not designed for this purpose. It routes traffic based on efficiency, not network topology, meaning packets between your offices may take wildly different paths at different times. The internet provides no guarantees about latency, packet delivery order, or bandwidth consistency. It is inherently insecure, with traffic potentially visible to intermediaries, requiring encryption. And it uses public IP addresses, while your internal networks likely use private address spaces (like 10.0.0.0/8 or 192.168.0.0/16) that are not routable over the internet.

The solutions we explore address all these challenges: they create encrypted tunnels, they can make geographically distributed networks appear as a single subnet, they handle the complexities of routing across the internet, and they provide mechanisms for peers to discover and communicate with each other.

Key Networking Concepts

Before diving into specific solutions, let us establish the conceptual foundation. Understanding these terms will help you evaluate solutions and design your network architecture.

Site-to-Site VPN

A site-to-site VPN connects entire networks at different locations, allowing all devices at one location to reach all devices at another location without individual configuration on each device. Think of it as connecting two office buildings with an invisible bridge—all computers in building A can directly communicate with all computers in building B as if they shared the same physical network.

In a site-to-site configuration, the VPN gateways (servers that handle VPN traffic) are typically always-on at each location. Traffic between sites flows through these gateways automatically, without users needing to initiate connections. This is the most common architecture for connecting multiple offices.

Mesh Networking

Mesh networking takes a different approach: instead of routing all traffic through central gateway servers, each node in the network can connect directly to other nodes. In a full mesh, every office has VPN tunnels to every other office. This eliminates single points of failure and can reduce latency by allowing direct connections between nearby nodes.

Partial mesh architectures connect some nodes directly while others route through intermediaries, balancing the benefits of direct connections with the complexity of maintaining many tunnels.

Overlay Networks

An overlay network is a virtual network that runs on top of an existing network—in this case, the public internet. Your overlay network has its own addressing scheme, completely independent of the underlying internet. Devices on your overlay get IP addresses that are only meaningful within your virtual network, allowing you to create a consistent network across locations even though the underlying internet connections differ.

The overlay handles all the complexity: encryption, routing, address assignment, and peer discovery. From the perspective of your applications and services, they are simply on a local network with other overlay devices.

IP Routing Between Subnets

Every IP address belongs to a subnet, and routers determine how traffic moves between subnets. In a multi-site VPN, you have multiple subnets—one per physical location. Your VPN solution must handle routing, deciding whether traffic goes directly between two sites or through intermediate hops.

Simple solutions may rely on default routing—all traffic goes to a central hub and gets forwarded to the destination. More sophisticated solutions use dynamic routing protocols to determine the best path based on current network conditions.

Open Source VPN Solutions

Let us now examine the leading open source solutions, their strengths, their ideal use cases, and their trade-offs.

WireGuard: The Modern Standard

WireGuard represents a fundamental shift in VPN design. Created by Jason Donenfeld and first merged into Linux kernel 5.6 in 2020, WireGuard was built from the ground up using modern cryptographic primitives and a minimal code base.

What WireGuard Is: WireGuard is a fast, modern VPN protocol that uses the Linux kernel for maximum performance. It provides point-to-point encrypted tunnels between devices, with each device having a public/private key pair for authentication.

Strengths:

The most striking characteristic of WireGuard is its simplicity. The entire codebase is approximately 4,000 lines, compared to over 100,000 for OpenVPN. This minimalism translates to fewer potential security vulnerabilities, easier auditing, and faster development. Performance is exceptional—WireGuard typically achieves speeds several times higher than OpenVPN in benchmarks, largely because it runs in kernel space rather than user space.

WireGuard uses modern, efficient cryptographic primitives: Curve25519 for key exchange, ChaCha20 for encryption, Poly1305 for message authentication, and SipHash for hashtable keying. These are all designed for speed and security. The protocol establishes new sessions quickly, making it suitable for mobile environments where connections frequently change.

Ideal Use Cases:

WireGuard excels at site-to-site connections between offices, especially when performance is critical. It works beautifully for connecting cloud infrastructure to your network. Because it is now included in Linux kernels and has native support in many operating systems, it is ideal for organizations that value simplicity and performance.

However, WireGuard does have limitations. It was designed primarily as a point-to-point VPN, not as a mesh network solution. While you can manually configure complex topologies, built-in support for automatic mesh networking is limited. It also does not include built-in user management or a central control plane—these must be added separately if needed.

Example Configuration:

A simple WireGuard site-to-site configuration between two offices might look like this:

# Office A (New York) - wg0.conf
[Interface]
Address = 10.0.1.1/24
PrivateKey = [Office A private key]
ListenPort = 51820

[Peer]
PublicKey = [Office B public key]
Endpoint = office-b.example.com:51820
AllowedIPs = 10.0.2.0/24
PersistentKeepalive = 25

OpenVPN: The Established Veteran

OpenVPN has been the standard open source VPN solution for over two decades. It is battle-tested, extremely flexible, and supported by virtually every platform.

What OpenVPN Is: OpenVPN is a full-featured VPN solution that supports both site-to-site and remote access VPN configurations. It uses OpenSSL for cryptography, supporting a wide range of encryption algorithms and authentication methods.

Strengths:

OpenVPN’s greatest strength is its flexibility. It can穿越 almost any firewall or NAT device, works over both TCP and UDP, and supports a vast array of authentication methods including certificates, smart cards, and username/password combinations. If you have a requirement, OpenVPN likely supports it.

The extensive feature set includes traffic splitting (only routing some traffic through the VPN), multi-factor authentication integration, robust access control, and detailed logging. Thousands of commercial products are built on OpenVPN, meaning professional support is readily available if needed.

OpenVPN has proven reliable over decades of production use. Organizations that prioritize stability and predictability often choose OpenVPN for this reason.

Ideal Use Cases:

OpenVPN is ideal when you need maximum compatibility with existing infrastructure, when you require advanced features like traffic splitting or sophisticated access control, or when your organization prefers technologies with longer track records. It is also the right choice when you need to support legacy clients or environments where you cannot install custom software.

The trade-off is complexity. Configuring OpenVPN for anything beyond basic use cases requires significant expertise. Performance is generally lower than WireGuard, and the larger code base presents a larger attack surface.

SoftEther VPN: The Feature-Rich Powerhouse

SoftEther VPN is an open source VPN solution developed at the University of Tsukuba in Japan, now maintained by SoftEther Corporation. It offers an impressive feature set while remaining freely available.

What SoftEther Is: SoftEther is a multi-protocol VPN server that supports its own SoftEther protocol, along with OpenVPN, L2TP/IPsec, and SSTP. It can function as both a VPN server and a VPN client, and includes a built-in NAT and DHCP server.

Strengths:

SoftEther’s standout feature is its protocol flexibility. A single SoftEther server can accept connections from WireGuard clients, OpenVPN clients, native Windows VPN clients (via SSTP), and iOS/Android clients (via L2TP/IPsec). This makes it an excellent choice for organizations with diverse client requirements.

The software includes a built-in VPN server, NAT functionality, DHCP server, and even a simple bandwidth control mechanism—all in one package. Setting up a basic VPN server can be done through a graphical interface, though advanced configurations require command-line work.

SoftEther includes some unique features: a VPN between different cloud providers, support forVPN over ICMP (useful when all other ports are blocked), and a “VPN Azure” service for NAT traversal.

Ideal Use Cases:

SoftEther is ideal when you need to support diverse client types without deploying multiple VPN servers. It is also excellent for organizations in regions with heavy network restrictions, since the many protocol options provide flexibility in bypassing firewalls.

The learning curve is moderate. Basic setup is easy through the GUI, but achieving optimal performance requires understanding the underlying mechanisms.

Tinc: The P2P Mesh Pioneer

Tinc is one of the oldest open source mesh VPN solutions, having been in development since 1998. It implements a complete mesh networking solution with automatic route discovery.

What Tinc Is: Tinc is a mesh VPN daemon that creates peer-to-peer encrypted tunnels between all participating nodes. It automatically discovers paths between nodes and can route traffic through multiple hops when direct connections are unavailable.

Strengths:

Tinc was designed from the ground up for mesh networking. Each node connects to several other nodes, and traffic between any two nodes can traverse multiple hops automatically. If your primary path between London and Tokyo goes through New York, Tinc handles this transparently.

The configuration is entirely decentralized—no central server is required for the mesh to function. Nodes can join the mesh by connecting to any existing node, and the network automatically learns about new routes.

Tinc supports VLAN-like functionality, allowing you to create multiple virtual networks on the same tinc installation. This is useful for separating different types of traffic or creating isolated networks.

Ideal Use Cases:

Tinc is ideal for organizations that need true mesh networking with automatic failover, particularly when infrastructure is dynamic or when you want to avoid single points of failure. It has a small footprint and runs well on embedded hardware.

The trade-off is that Tinc’s configuration can be complex for large networks, and it does not have the same level of modern development activity as newer solutions. Performance, while adequate, is generally lower than WireGuard.

ZeroTier: The User-Friendly Mesh

ZeroTier creates software-defined networks that connect devices anywhere in the world. It combines the simplicity of a cloud service with open source technology, offering both a free tier for small networks and commercial plans for larger deployments.

What ZeroTier Is: ZeroTier is a peer-to-peer VPN solution that creates encrypted Layer 2 networks. Devices on a ZeroTier network appear to be on the same local network, regardless of their physical location. ZeroTier Central provides a web-based interface for network management.

Strengths:

ZeroTier excels at simplicity. You can add a device to your network by installing the client and entering a network ID—no firewall configuration, no port forwarding, no complex routing setup. The central management console makes viewing network topology, managing authorization, and monitoring traffic straightforward.

The solution creates true Layer 2 connectivity, meaning you can use protocols that rely on broadcast or multicast (like certain discovery protocols or legacy applications) without special configuration. Network bridging allows you to connect ZeroTier to your physical LAN, extending your network transparently.

ZeroTier includes built-in support for path discovery and NAT traversal, handling the complexities of connecting devices behind different types of NAT and firewalls automatically.

Ideal Use Cases:

ZeroTier is ideal for organizations that prioritize ease of deployment and management, especially for teams without dedicated network engineering resources. It is excellent for small to medium deployments, remote teams, and use cases where you need Layer 2 connectivity.

The consideration is that while the software itself is open source, the coordination services (the “planets” and “moons” that help with peer discovery) are provided as a service. For some organizations, running entirely self-hosted solutions is preferable.

Example Architecture:

A typical ZeroTier deployment might have a central controller running self-hosted (ZeroTier supports this), edge nodes at each office running the ZeroTier client, and remote employees also running clients. All nodes get IP addresses from the ZeroTier address space, and they communicate directly whenever possible.

Nebula: The Scalable Mesh

Nebula was created by the team at Containous (now Tetrate), the makers of Traefik. It is designed specifically for large-scale mesh networking with an emphasis on security and simplicity.

What Nebula Is: Nebula is a distributed VPN system that creates encrypted tunnels between nodes. It uses a hub-and-spoke model by default but can operate in mesh mode. Nodes are organized into groups, and security policies control which nodes can communicate with which.

Strengths:

Nebula was designed for scalability. While Tinc can struggle with very large networks, Nebula handles hundreds or thousands of nodes efficiently. The configuration system allows you to define security policies once and apply them across the entire network.

The certificate-based authentication system provides robust security, with each node having its own certificate. The lighthouse mechanism provides a simple way for nodes to discover each other without requiring every node to maintain connections to every other node.

Nebula includes excellent logging and debugging capabilities, making troubleshooting easier than with some alternatives.

Ideal Use Cases:

Nebula is ideal for larger organizations, especially those with cloud infrastructure spanning multiple regions. It excels at connecting diverse environments—offices, cloud instances, and remote workers—into a unified network.

The trade-off is that Nebula requires more initial configuration than ZeroTier, and the learning curve is somewhat steeper. However, for larger deployments, the management capabilities pay dividends.

Comparison and Selection Guide

Choosing the right VPN solution requires evaluating your specific requirements. The following comparison should help you narrow down the options.

Feature WireGuard OpenVPN SoftEther Tinc ZeroTier Nebula
Architecture Point-to-Point Gateway Multi-protocol Mesh Mesh Hybrid
Code Size ~4K lines ~100K+ lines ~150K lines ~8K lines Open source client ~15K lines
Performance Excellent Moderate Good Moderate Good Good
Mesh Support Manual No Limited Native Native Native
Ease of Setup Easy Moderate Easy-GUI Moderate Very Easy Moderate
Client Support All major OS All major OS All major OS Most OS All major OS Linux, macOS, Windows
Central Management External Built-in Built-in Manual Web UI Config files
Active Development Very Active Stable Active Low Active Active

Which Solution for Which Use Case?

For maximum performance with moderate complexity: Choose WireGuard. This has become the default choice for most new deployments. Pair it with a management layer like Netmaker or WireGuard UI if you need centralized management.

For maximum compatibility and proven reliability: Choose OpenVPN. If you need to support a wide variety of clients or require features that have stood the test of time, OpenVPN remains solid.

For protocol flexibility: Choose SoftEther. When you need to support diverse client types or operate in restricted network environments, SoftEther’s multi-protocol support is invaluable.

For small mesh networks: Choose Tinc or ZeroTier. For smaller deployments (under 50 nodes) where ease of use matters, ZeroTier is simplest. For more control and less cloud dependency, Tinc works well.

For large-scale deployments: Choose Nebula or WireGuard with management. If you anticipate growth beyond 100 nodes, Nebula’s scalability becomes important.

For rapid deployment with minimal network expertise: Choose ZeroTier. The learning curve is lowest, and you can have a working network in minutes.

Practical Deployment Guidance

Let us now examine how these solutions are typically deployed in a multi-site company setup.

Planning Your Network Architecture

Before deploying any VPN solution, map out your requirements. Document your sites (offices, data centers, cloud VPCs), the number of devices at each site, the types of traffic that will cross the VPN, and your performance requirements.

Consider your address space. Will you use a single subnet for all locations (simplest, but requires your VPN to support this), or will you route between subnets (more complex, but more scalable)? Most modern mesh solutions prefer a flat address space, while traditional site-to-site VPNs typically use routed subnets.

Plan for redundancy. What happens when a site loses internet connectivity? Does traffic automatically reroute through another path? Solutions like Tinc and Nebula handle this automatically; with WireGuard, you may need to configure multiple paths.

Typical Deployment Patterns

Hub-and-Spoke with WireGuard: One central office acts as the hub; all other offices connect to the hub. All traffic between branch offices flows through the hub. This is simple to configure but creates a single point of failure at the hub. Deploy redundant hubs for resilience.

Full Mesh with Tinc/Nebula: Every office connects directly to every other office. This provides the best performance and resilience but requires more configuration as you add sites. Use partial mesh (direct connections to nearby sites, hub-and-spoke to distant sites) for larger deployments.

Hybrid with ZeroTier: Combine ZeroTier for remote employees with site-to-site VPN for offices. The VPN connects offices at Layer 2, while ZeroTier provides seamless access for remote workers without requiring office infrastructure.

Security Considerations

Regardless of which solution you choose, follow these security practices:

Use strong authentication. For WireGuard, generate keys securely and rotate them periodically. For solutions supporting certificates (Nebula, OpenVPN), use a proper certificate authority. Enable two-factor authentication where supported.

Encrypt everything. All the solutions discussed use encryption by default. Verify your configuration and ensure you are not falling back to unencrypted modes.

Implement network segmentation. Even within your VPN, separate sensitive systems from general access. Use VLANs or separate virtual networks to limit blast radius if a system is compromised.

Monitor your network. Establish baselines for normal traffic patterns and alert on anomalies. Many VPN solutions include logging—ensure logs are reviewed or aggregated.

Performance Optimization

Getting the best performance from your VPN requires attention to several factors:

Bandwidth matters more than latency for most applications. While VPN overhead adds latency, the more significant impact is usually bandwidth reduction. Choose solutions with efficient encryption (WireGuard’s ChaCha20 performs well on a wide range of hardware).

For WireGuard, ensure the server has adequate CPU for encryption. While WireGuard is efficient, at very high throughput (10+ Gbps), you may need multiple cores or hardware acceleration.

Consider network paths. If your primary ISP route between two offices is poor, you might benefit from a solution that can use multiple paths or from manually configuring backup routes.

Multi-Cloud and Hybrid Deployments

Modern enterprises often span multiple cloud providers plus on-premises infrastructure. Here is how VPN solutions fit:

WireGuard works excellently for cloud-to-cloud and cloud-to-on-premises connections. Deploy WireGuard servers (or instances) in each cloud VPC and connect them.

ZeroTier and Nebula can treat cloud instances as just another node in the network. This provides the same seamless connectivity whether your server runs in AWS, Azure, Google Cloud, or your data center.

SoftEther includes features specifically designed for cloud connectivity, including the ability to create VPN connections between different cloud providers.

Implementation Checklist

When deploying your chosen solution, work through these steps:

  1. Proof of Concept: Deploy your chosen solution in a small test environment first. Verify connectivity, measure performance, and confirm that all required use cases work.

  2. Document Your Design: Create a network diagram showing all sites, the IP address scheme, and how traffic will flow. Document the configuration of each node.

  3. Pilot Deployment: Roll out to one site (or a small group of users) first. Monitor closely for issues before expanding.

  4. Monitoring Setup: Ensure you can see network health, VPN tunnel status, bandwidth usage, and connection logs before deploying widely.

  5. Gradual Expansion: Add sites one at a time, verifying connectivity and performance at each step.

  6. Documentation and Training: Document how to add new sites, how to troubleshoot common issues, and how to contact support. Ensure your IT team can manage the system.

  7. Establish Routines: Set up regular reviews of VPN performance, key rotation schedules, and configuration backup.

Conclusion

Building a unified internal network across geographically distributed offices is entirely achievable with open source tools. The key is selecting the right solution for your specific requirements—whether that is WireGuard’s performance, OpenVPN’s flexibility, SoftEther’s protocol support, Tinc’s mesh capabilities, ZeroTier’s ease of use, or Nebula’s scalability.

Modern VPN solutions have matured significantly. Where organizations once required expensive proprietary solutions for acceptable performance and features, open source alternatives now match or exceed commercial offerings in most dimensions. The trade-offs are primarily about deployment complexity, management requirements, and specific feature needs.

Start with a clear understanding of your requirements, pilot your chosen solution in a limited deployment, and expand methodically. With proper planning and execution, you can create a network that makes your distributed workforce feel like they are working in the same room—no matter where in the world they are.

Resources

Comments