
WireGuard is an open-source virtual private networking (VPN) application. Vultr's WireGuard Marketplace Application deploys a preconfigured WireGuard server that supports multiple VPN clients through a single instance. You can use the WireGuard VPN server to connect multiple client devices and reach the internet through the server's public IP without exposing any local addresses.
This guide explains how to deploy Vultr's WireGuard Marketplace Application. It covers connecting clients from Windows, macOS, and Linux, and verifying connectivity to the VPN server.
WireGuard offers the following virtual private networking (VPN) features, enabling you to set up secure and reliable connections between devices.
Follow the steps below to deploy Vultr's WireGuard Marketplace Application.
Log in to the Vultr Console.
Click Compute on the main navigation menu and click Create Instance +.
Select your desired instance plan, such as Dedicated CPU, and specify the compute specifications, such as 2 vCPUs and 4 GB RAM.
Click Configure Software to specify the system image.
Click Marketplace App within the Image Selection and Configuration section.
Enter WireGuard as the search term and select it from the search results.
Specify the server hostname and additional features.
Click Deploy and wait for the installation process to complete.
Open the instance's management page and verify the WireGuard application instructions including the endpoint, port, and default subnet information for connecting to the VPN server.
The application also preconfigures one client peer at the 10.1.0.2 address and hosts its client configuration at http://SERVER_IP/wireguard_conf/wg0.conf, protected by HTTP basic authentication. The following section creates an additional client at 10.1.0.3 so the two configurations do not conflict.
Each WireGuard client needs its own keypair and a matching [Peer] entry on the server. Each side's [Peer] entry contains the public key of the device on the other side of the tunnel.
Log in to your WireGuard server using SSH.
Replace SERVER_IP with your server's public IP address.
Generate a new WireGuard client keypair using the wg command.
Print the generated client_private.key and client_public.key files.
Copy the generated keys in your output to use them in your client configurations.
List files in the /etc/wireguard directory and verify the available configurations in your output.
Output:
Based on the above output, wg0.conf is the available WireGuard interface configuration.
Open the wg0.conf file using a text editor such as nano.
Add a new [Peer] block with your WireGuard client's public key at the end of the file.
Replace CLIENT_PUBLIC_KEY with the public key you generated earlier.
Save and close the wg0.conf file.
Display the server's public key.
The output is the server's public key. Copy it to use in the next step.
Create a new client1.conf file in your working directory to create a transferable client configuration.
Add the following contents to the client1.conf file.
Replace:
CLIENT_PRIVATE_KEY with the private key from client_private.key.SERVER_PUBLIC_KEY with the value from the previous step.SERVER_IP with your server's public IP address. Save and close the client1.conf file.
The above configuration specifies the WireGuard client information used to establish connections to the VPN server using its endpoint. The AllowedIPs = 0.0.0.0/0 value routes all client traffic through the VPN server.
Restart the WireGuard service to apply the configuration changes.
Verify that the new peer appears in the interface's configuration.
The output lists the new peer's public key. A latest handshake entry appears only after a client connects, so it may be absent until then.
WireGuard supports multiple client applications for connection to a VPN server. You can connect using the official application for your mobile device, desktop, or a Linux-based system. Before connecting a client, verify that its public key appears as a peer in the wg show wg0 output on the server.
Print the contents of the client1.conf file you generated earlier.
Copy the output.
On your client device, create a new file named client1.conf and paste the copied contents into it.
Repeat this process for each client device you want to connect to the VPN server.
The official WireGuard application provides the same tunnel-import workflow for Windows and macOS.
Visit the official WireGuard Installation page.
Download the latest installer for your desktop operating system, such as the Windows installer.
Run the installer to install WireGuard.
Open WireGuard from your applications menu.
Click Import tunnel(s) from file and select the client1.conf file you created earlier.
Click Activate to connect to your VPN server.
Verify that the VPN connection is successful and monitor the data transfer rates.
Linux systems use the wg-quick command-line tool instead of a GUI application.
The client configuration routes all traffic through the VPN server. If you connect to the Linux client over SSH, activating the tunnel disconnects your SSH session. Run these steps from a local terminal or a console session on the client.
Update the package index on your Linux system.
Install WireGuard.
Move the client1.conf file you created earlier to the /etc/wireguard directory.
Activate the configuration to establish a tunnel connection to the VPN server.
Verify that the client established a handshake with the server.
The output includes a latest handshake entry after the connection succeeds.
Enable the WireGuard client interface to run at boot.
Test the connection to the VPN server's tunnel address.
The output reports 0% packet loss, which confirms that the client reaches the server through the tunnel.
Verify that the client's internet traffic leaves through the VPN server.
The output displays your VPN server's public IP address.
You have deployed Vultr's WireGuard Marketplace Application, created client configurations, and connected clients to the VPN server. Your client devices now reach the internet through the server's single public IP without exposing local addresses. For more information, refer to the official WireGuard documentation.
0 Comments
Be the first to comment and share your perspective with the community.