Giter VIP home page Giter VIP logo

wireguard's Introduction

Build Status Maintainability

Wireguard

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

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

Quick Start

Ubuntu

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

chmod +x ./wg-ubuntu-server-up.sh
sudo ./wg-ubuntu-server-up.sh

Debian

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

chmod +x ./wg-debian-server-up.sh
sudo ./wg-debian-server-up.sh

To get a full instruction, please follow to the article above.

Supported OS

  • Ubuntu 18.04
  • Ubuntu 20.04
  • Debian 9
  • Debian 10

wg-ubuntu-server-up.sh

This script:

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

Usage

wg-ubuntu-server-up.sh [--clients=<clients_count>] [--no-reboot] [--no-unbound]

Options:

  • --clients=<clients_count> how many client's configs will be created
  • --no-unbound disables Unbound server installation (1.1.1.1 will be used as a default DNS for client's configs)
  • --no-reboot disables rebooting at the end of the script execution

Example of usage

./wg-ubuntu-server-up.sh
./wg-ubuntu-server-up.sh --clients=10

wg-debian-server-up.sh

This script works the same way and with the same options, that wg-ubuntu-server-up.sh do.

wg-genconf.sh

This script generate server and clients configs for WireGuard.

If the public IP is not defined, then the public IP of the machine from which the script is run is used. If the number of clients is not defined, then used 10 clients.

Prerequisites

Install WireGuard if it's not installed.

Usage

./wg-genconf.sh [<number_of_clients> [<dns_ip> [<server_public_ip>]]]

Where:

  • number_of_clients how many client's configs will be generated
  • dns_ip the script should use this IP as a DNS address
  • server_public_ip the script should use this IP as a server address

Example of usage:

./wg-genconf.sh
./wg-genconf.sh 10
./wg-genconf.sh 10 1.1.1.1
./wg-genconf.sh 10 1.1.1.1 157.245.73.253

wireguard's People

Contributors

drew2a avatar buraksarica avatar arthuriantech avatar

Watchers

James Cloos avatar  avatar

Forkers

cjp2014

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.