WireGuard is a fast and modern VPN protocol that is aiming to replace both IPSec and TLS based solutions like OpenVPN. It uses state-of-the-art cryptography, like the Noise protocol framework, Curve25519, ChaCha20, Poly1305, BLAKE2, SipHash24, HKDF and secure trusted constructions. It is a point-to-point VPN, which means it does not have a client-server architecture, but peers, and does not rely on a PKI, unlike OpenVPN. It is super simple to setup to connect multiple machines together.
WireGuard supports roaming, which means you can switch between network connections and not have to reconnect to your peers. On servers, it’s rarely useful, but when one of the peer is a mobile client like a laptop or a smartphone, it’s a life saver, because the usage of WireGuard is completely transparent.
In this post, we’ll see how to easily and quickly set up a dual-stack WireGuard VPN on a Linux server using a script by angristan on github. It also works on Debian, Fedora, Centos, Arch, Linux.
Setting up your VPS Server
Assuming you have root access to your Ubuntu/Linux Based VPS server, download the script from github by typing the following command.
curl -O https://raw.githubusercontent.com/angristan/wireguard-install/master/wireguard-install.sh
Setup the appropriate permission for the script by typing the following.
chmod +x wireguard-install.sh
Now lets run the script.
The script is pretty self- explanatory. After you run the script, it’ll ask for some basic information. The script will fill up the information by itself but verify them before you press enter.
After you’ve done the setup successfully, you’ll find a “.conf” file in your /root/ directory. For me it was “wg0-client.conf”. Download the file to your device via FTP/SFTP or any other method.
Setup Windows & Android Client
Download WireGuard for windows from here. Install it. Now click import tunnel from file and select the .conf file.
After importing, it’ll look something like this. Now click activate to start a secure VPN Tunnel.
Now lets getup setup on Android. Go the the play store and get the WireGuard app from WireGuard Development Team. Open the app and press the “+” button on bottom right and select your .conf file. Now Flick the button and Voila ! You VPN is connected.
This is how you can use your VPS to roll out a personal VPN for you. WireGuard is extremely fast to connect and browse. If you liked this article, follow me on social media !