WireGuard VPN Setup with QR Code - Mobile Security and Ad Blocking


This post will go over setting up a WireGuard VPN server using OpenWRT. Part 2 will focus on setting up Pi-Hole. You could also use a $5/month VPS service, but I already had all the hardware needed to do it at home. Skip to instructions.

What you will need:

  1. An OpenWRT router with LuCi and enough space to install the WireGuard software and DDNS software. 
  2. A domain name. I am using namecheap.com which includes a Dynamic DNS service. It can be ANY domain name, even the $.99 per year type. 
  3. Raspberry Pi with PiHole installed (Optional) 

 What this will do: 

  1. Add security when using public wifi or cellular data. Since all data is encrypted and sent through your home internet connection, traffic cannot be sniffed or intercepted. 
  2. Keep your browsing history private - meaning the wifi owner or cellular carrier will not be able to see your internet activity. 
  3. Bypass content filters put in place by wifi hotspot operators or cellular carriers. 
  4. Remove ads without installing a plugin or app. (Optional) 

 What this will NOT do: 

  1. Anonymize your traffic through your ISP. If you are trying to pirate content or do something else undesirable, this is NOT the walkthrough you are looking for. In fact, this will do the opposite of what you are looking for, since your ISP will have even MORE usage metrics from your account. I mention this because when you do a "VPN" search on google, most results are for shady VPN companies. 
  2. This will not save battery life! It will drain your battery faster than normal when the VPN is active.
  3. Increase speed. Your download speed will be limited to the upload speed of your home internet, which is typically somewhat slow. 

Parts used in this post:

  1. TP-Link Archer C7 v2
  2. OpenWRT 18.06
  3. Namecheap DNS register and DDNS  https://www.namecheap.com
  4. Raspberry Pi 3
  5. Pi-hole https://pi-hole.net

Here are some of the sources I used when configuring:
https://openwrt.org/docs/guide-user/services/vpn/wireguard
https://www.wireguard.com
http://chrisbuchan.co.uk/uncategorized/wireguard-setup-openwrt/