Skip to main content
A WireGuard Interface forwards traffic between its peers. Hosts in different clouds that join the same interface reach each other on the interface subnet, even when their cloud firewalls block all inbound traffic except SSH.

Setup

  1. Create a WireGuard Interface and wait for provisioned, as in the Quick Start.
  2. Create one peer for each host and load each configuration with WireGuard on Linux. Both configurations route 172.27.0.0/24 through the tunnel.
  3. Leave inbound HTTP closed in both cloud firewalls. Each peer opens its tunnel to the interface endpoint, so WireGuard needs no inbound rule.

Result

Both instances run a web server and allow only inbound SSH, so neither answers from the internet:
Over the interface subnet, each instance reaches the other. From the EC2 instance:
From the Droplet:
Add more peers in other clouds or data centers the same way. Every peer on the interface reaches every other peer on 172.27.0.0/24.