Installation WireGuard

VPN Connection Types

This section is important for future steps (so you know what kind of profiles you’d like to create). We will be creating either a split-tunnel VPN, full-tunnel VPN, or both in later steps.

Split-Tunnel VPN: Traffic is only sent through your network if it is attempting to access an internal resource. Your IP address when navigating to a site outside of your network will be the IP address of the network that you are currently on.

Full-Tunnel VPN: All traffic is sent through your home network. Your IP address for internal and external requests will be your home networks.


  1. Let’s install and configure out Wireguard instance now!
  • Now we can configure Wireguard.
    Start by creating the needed folder and the private/public keys of the server:
  • The next screen will inform you that you need to set a static IP address. It’s best to set a static IP address in your router’s settings, as you are ensuring that DHCP does not try and give this address to any other devices. However, certain routers (mostly ISP provided ones) do not allow you to complete DHCP reservations. If you can’t set a static IP address for your Raspberry Pi in your router, set a static IP address on the Raspberry Pi by following the instructions. I specified a static IP address in my router so I am going to skip this step.
  • You will now need to select a local user. If you’ve created a different user (outside of the default pi user), you will have the option here.
  • You might be prompted to install the latest kernel update. If you are, select Yes to proceed. If it doesn’t, skip to the next step to proceed. NOTE: If you need to update the kernel, you will be required to restart this process after your Raspberry Pi reboots
  • You will be asked to enter the port you’d like to use (default is 51820). It’s probably best to keep it as the default, but if you have a reason to change it, you can do that here.
  •  You now need to select the DNS provider you’d like to use. Select Custom if you’d like to use your own DNS server, or any of the public DNS providers if you don’t want to use a local DNS server.
  • You will now be prompted to use your public IP address or public DNS entry. If you have a static IP address, you are free to use this address. However, if you have a dynamic external IP address
  1. You will now be prompted that the server keys will be generated. Select OK. The next step will tell you that the VPN Server will check for unattended-upgrades, and a periodic reboot will be required. This is a great option. Enable unattended-upgrades (unless you have a good reason not to) and proceed. The packages will now install.
  • The installation is now complete! Reboot your system.

if you like to check with screen how to install wireguard in Raspberry Pi Please check the Below with Screenshots.

How to install Pihole addblocker & Wireguard VPN server in Ubuntu 20.04

After the ubantu server we need to login to sever

Need to update and upgrade

Sudo apt-get update or sudo apt update

Sudo apt upgrade

After that need to run the pihole installation command

shariq@bckup:~$ sudo curl -sSL | bash

Once installation start screen appear

And also screen will be appear like this need to insert the static IP address and DNS

If you are using public Static ip you can use thator if you’re using dynamic public ip you need to connect with dynamic public ip updater in every 24hours like dyndns

The installation is now complete! Reboot your system

Pivpn add

Client name : ….

After creating the client

One thought on “Installation WireGuard

  • February 19, 2022 at 10:44 am

    getting error if selected google dns.
    in custom DNS using static IP working fine.
    please also suggest the metthod or write selected Google DNS options.
    thanks for sharing.


Leave a Reply

Your email address will not be published. Required fields are marked *