Skip to content

This repository contains scripts that make it easy to configure WireGuard on VPS.

License

Notifications You must be signed in to change notification settings

tessharp/wireguard

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wireguard

This repository contains scripts that make it easy to configure WireGuard on VPS.

This script has been updated from its original repository by @drew2a.

Original article is in Medium: How to deploy WireGuard node on a DigitalOcean's droplet

Quick Start

wget https://raw.githubusercontent.com/tessharp/wireguard/master/wg-server-up.sh

chmod +x ./wg-server-up.sh
./wg-server-up.sh -d unbound
# OR
./wg-server-up.sh -d pihole

Roadmap

  • Review and fix Pihole deployment (Currently does not resolve appropriately)
  • Simplify adding clients - remove requirement for assigning octet if not specified by user

wg-server-up.sh

This script will:

  • Installs al necessary software on an empty Ubuntu DigitalOcean droplet (it should also work with most modern Ubuntu images)
  • Configures IPv4 forwarding and appropriate iptables rules
  • Sets up unbound or pihole as a DNS resolver
  • Creates a server and clients configurations
  • Installs qrencode
  • Runs WireGuard

Usage

wg-server-up.sh -d [unbound|pihole]

Examples

./wg-server-up.sh -d unbound

Prerequisites

Install WireGuard if it's not installed through the wg-server-up.sh script.

wg-genconf-user.sh

This script will generate clients configs for WireGuard and add or remove the relevant user configuration to the server config. You need to supply the configuration file, client name, and last octet of the IP used to route the WireGuard traffic.

Usage

./wg-genconf-user.sh -c [configuration_file] -[a|d] [client_name] -o [IP_last_octet]

Examples

./wg-genconf-user.sh -c /etc/wireguard/wg0.conf -a client -o 5
./wg-genconf-user.sh -c /etc/wireguard/wg0.conf -d client

About

This repository contains scripts that make it easy to configure WireGuard on VPS.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%