Innovate | Connect | Transform
ContactService statusUSD $

GICT knowledge base

How to setup Wireguard VPN on VPS

Published

VPN

Login to the server via SSH:

bandicam 2021-07-24 20-42-28-629

Run the following command:

wget https://git.io/wireguard -O wireguard-install.sh && bash wireguard-install.sh

bandicam 2021-07-24 20-44-54-046

Once you run the command it will ask for the port. The default port can be left blank or enter 51820 and hit enter.

bandicam 2021-07-24 20-45-14-861

Now enter the client name as per your preference and hit enter.
bandicam 2021-07-24 20-45-45-889

Now it will display the DNS server list for the client. I have selected AdGuard, type the number, and hit enter. And Press any key to continue.

bandicam 2021-07-24 20-46-05-170

Once the installation is complete you will see the QR code which can be used to configure the VPN configuration on an iPhone or Android. The configuration file is located under the /root with the client name as mark.conf. The path will be /root/mark.conf

bandicam 2021-07-24 20-46-40-046

Download the .conf file to your local system:

Run terminal window on your local system and type in the following:

scp [email protected]:mark.conf /Users/admin/desktop

It will connect to your VPS and ask it to transfer mark.conf to your local /Users/admin/desktop folder. The transfer will be successful.

Or you can use the SFTP method to connect to the server using any FTP client and download the file to your local system.

Now download the WireGuard application from WireGuard.com. Click on Installation.

bandicam 2021-07-24 20-54-28-609

Select the installation type depending on your Computer OS.

bandicam 2021-07-24 20-55-27-656

Now install the application and let it install.

bandicam 2021-07-24 21-03-07-784

Now open the WireGuard application and click on Import tunnel(s) from the file.

jio

Now select the .conf file and click on Open.

bandicam 2021-07-24 22-20-21-354

Here click on the Active button and allow it few seconds to connect.

jio1

Here you can see the status as Active. That means VPN is active and connected with the server.

jio2

You can verify this by typing whats my IP in your browser and it should show the VPS associated IP.

bandicam 2021-07-24 22-23-16-599

If you have got any questions please feel free to contact us.  Will be happy to help you.

Related guides

Account services are unavailable until the production backend is configured.