On naming convention: in the API Reference, certain legacy documentations, and the Mission Control Portal, WireGuard Gateways are referred to as “Wireguard Interfaces”.
In this guide and all guides under the “Networking” collection, the term WireGuard Gateway is used consistently.
The devices that connect to it are referred to as WireGuard Peers or simply Peers
Introduction
WireGuard Gateway (WGW) is an element to which peers can connect and form a VPN over the public internet. It’s built on top of the WireGuard implementation.Creating a WGW
Step 1: Create a Network
Follow this guide.Step 2: Check for Coverage
Follow this guide. Usefilter[available_services][contains]=cloud_vpn to look for a desired site at which to deploy the WGW. ashburn-va is chosen for the subsequent steps.
Step 3: Create a WGW
Using the network created from Step 1 and the chosen region from Step 2, create the WGW.Once a WGW is created on a specific network, it cannot be “migrated” to another one; it needs to be recreated on the other network. Double check the correct
network_id is used in the following API request.provisioning.
endpointdenotes the publicly routable IP to which peers will connect over the public internet.server_ip_addressis the private subnet range the WGW and peers will use with WGW occupying the first usable IP.
Step 4: Wait for Status Transition
The expected time forstatus to transition to provisioned is approximately 5 minutes. You can poll the WGW to check for status.
Creating Peers
In the following example, a peer is created for the WGW from the previous section.private_key is only given to you ONCE in the creation API response. It must be stored by you.
conf file template.
private_key, you can import the conf file on the peer.
[Interface] refers to the local peer.
PrivateKeyshould have the value returned in theprivate_keyparameter.Addressis the next available IP in the subnet range. In this case, since this is the first peer, it gets the next IP after the WGW.
[Peer] refers to the WGW created previously.
PublicKeyis that of the WGWAllowedIPsis the network this peer has access to. See this excellent explanation.Endpointis the publicly exposed IP to which peers can connectPersistentKeepaliveis a default parameter that can be ignored.
Configuring Peers
With theconf file, you can import that onto the host. Here are the environment specific guides:
Use Cases
In this section, we introduce 3 use cases that WGW can accommodate by itself.Use Case 1: Multi-Cloud Network
WGW can be used as a VPN concentrator server to facilitate traffic between peers. In the following example, we will construct this architecture.
- Peer in Cloud A is an EC2 instance in AWS.
- Peer in Cloud B is a Droplet in DigitalOcean.
Peer in Cloud A
This EC2 instance runs an apache server but only allows inbound SSH traffic.
Peer in Cloud B
Similarly, this Droplet instance runs an apache server but only allows inbound SSH traffic.
Cross Cloud Boundary
Despite of the firewall rule configs in the respective environments, Peer 1 is able to talk to Peer 2 over the WireGuard subnet. From Peer 1Use Case 2: Private Access to Other Telnyx Services
If a WGW is created withenable_sip_trunking, the WGW will enable routing for all Telnyx public API endpoints.

AllowedIPs.
Use Case 3: Cross-Region Network
The previous architecture can be extended to the following one.
- Site A is Telnyx Ashburn
- Site B is Telnyx Amsterdam
- Cloud A is AWS
- Cloud B is Digital Ocean
Other use cases
- See Global IP (Coming Soon)
- See Internet Gateway (IGW) Guide
- See Private Wireless Gateway (PGW) Guide (Coming Soon)
Costs
- MRC for each WGW instance is $10.
- Connected Peers are free of charge.
API References
- WGW
- Peers