Introduction
In this article, we will discuss how to securely access the internet using a 2-hops WireGuard VPN setup on a Windows 11 laptop, with two VPS servers running Microsoft Server 2022. The setup involves connecting to the first VPS server (VPS1) and then using it to connect to the second VPS server (VPS2), before accessing the internet. This approach provides an additional layer of security and privacy when browsing the web.
Prerequisites
To follow along with this guide, you will need the following:
- A Windows 11 laptop
- Two VPS servers running Microsoft Server 2022
- WireGuard installed on both VPS servers and the Windows 11 laptop
Setting up the VPS Servers
First, we need to configure the two VPS servers. We will begin with VPS1, which will act as the intermediate server in our 2-hops setup. Follow these steps to set up VPS1:
- Log in to VPS1 using Remote Desktop Protocol (RDP) or any other method.
- Install WireGuard and create a new interface.
- Configure the interface with the necessary settings, such as the private and public keys, endpoint, and allowed IPs.
- Start the WireGuard interface.
Next, we will set up VPS2, which will be the final server in our 2-hops setup. Follow these steps to set up VPS2:
- Log in to VPS2 using RDP or any other method.
- Install WireGuard and create a new interface.
- Configure the interface with the necessary settings, such as the private and public keys, allowed IPs, and the endpoint.
- Start the WireGuard interface.
Configuring the Windows 11 Laptop
Now that the VPS servers are set up, we need to configure the Windows 11 laptop. Follow these steps to set up the laptop:
- Install WireGuard on the laptop.
- Create a new interface for VPS1 and configure it with the necessary settings, such as the private and public keys, allowed IPs, and the endpoint.
- Create a second interface for VPS2 and configure it with the necessary settings, such as the allowed IPs and the endpoint.
- Set up the routing table to route traffic through VPS1 to VPS2.
// Example configuration for the Windows 11 laptop
[Interface]
PrivateKey =
Address = 10.0.0.1/24
[Peer]
PublicKey =
AllowedIPs = 10.0.1.1/24
Endpoint =
[Peer]
PublicKey =
AllowedIPs = 0.0.0.0/0
Endpoint =
Testing the Setup
To test the setup, try browsing the web using the Windows 11 laptop. The traffic should pass through VPS1 and then through VPS2 before reaching the internet. You can use online tools, such as ipleak.net, to verify that the traffic is indeed coming from the VPS2 server.
In this article, we have discussed how to securely access the internet using a 2-hops WireGuard VPN setup with two Microsoft Server 2022 VPS servers and a Windows 11 laptop. By routing the traffic through the two VPS servers, we are providing an additional layer of security and privacy. With this setup, you can browse the web with confidence, knowing that your traffic is protected.