Giter Site home page Giter Site logo

wireguard-manager's Introduction

WireGuard Manager ๐Ÿ‘‹

Release ShellCheck Issues Sponsors PullRequest License


๐Ÿคท What is VPN ?

A Virtual Private Network (VPN) allows users to send and receive data through shared or public networks as if their computing devices were directly connected to the private network. Thus, applications running on an end-system (PC, smartphone, etc.) over a VPN may benefit from individual network features, protection, and management. Encryption is a standard aspect of a VPN connection but not an intrinsic one.

๐Ÿ“ถ What is WireGuardโ“

WireGuard is a straightforward yet fast and modern VPN that utilizes state-of-the-art cryptography. It aims to be faster, simpler, leaner, and more useful than IPsec while avoiding the massive headache. It intends to be considerably more performant than OpenVPN. WireGuard is designed as a general-purpose VPN for running on embedded interfaces and super computers alike, fit for many different circumstances. Initially released for the Linux kernel, it is now cross-platform (Windows, macOS, BSD, iOS, Android) and widely deployable. It is currently under a massive development, but it already might be regarded as the most secure, most comfortable to use, and the simplest VPN solution in the industry.

โ›ณ Goals

  • robust and modern security by default
  • minimal config and critical management
  • fast, both low-latency and high-bandwidth
  • simple internals and small protocol surface area
  • simple CLI and seamless integration with system networking

๐ŸŒฒ Prerequisite

  • CentOS, Debian, Ubuntu, Arch, Fedora, Redhat, Raspbian
  • Linux Kernel 3.1 or newer
  • You will need superuser access or a user account with sudo privilege.

๐Ÿ“ฒ Installation

Lets first use curl and save the file in /etc/wireguard/

curl https://raw.githubusercontent.com/complexorganizations/wireguard-manager/master/wireguard-server.sh --create-dirs -o /etc/wireguard/wireguard-server.sh

Then let's make the script user executable (Optional)

chmod +x /etc/wireguard/wireguard-server.sh

It's finally time to execute the script

bash /etc/wireguard/wireguard-server.sh

In your /etc/wireguard/clients directory, you will have .conf files. These are the client configuration files. Download them from your WireGuard Interface and connect using your favorite WireGuard Peer.


๐Ÿ’ฃ After Installation

  • Show WireGuard Interface
  • Start WireGuard Interface
  • Stop WireGuard Interface
  • Restart WireGuard Interface
  • Add WireGuard Peer
  • Remove WireGuard Peer
  • Uninstall WireGuard Interface
  • Update this script

๐Ÿ”‘ Usage

usage: ./wireguard-server.sh [options]
  --install     Install WireGuard Interface
  --start       Start WireGuard Interface
  --stop        Stop WireGuard Interface
  --restart     Restart WireGuard Interface
  --list        Show WireGuard Peers
  --add         Add WireGuard Peer
  --remove      Remove WireGuard Peer
  --reinstall   Reinstall WireGuard Interface
  --uninstall   Uninstall WireGuard Interface
  --update      Update WireGuard Script
  --help        Show Usage Guide

๐Ÿฅฐ Features

  • Installs and configures a ready-to-use WireGuard Interface
  • (IPv4|IPv6) Supported, (IPv4|IPv6) Leak Protection
  • Iptables rules and forwarding managed in a seamless way
  • If needed, the script can cleanly remove WireGuard, including configuration and iptables rules
  • Variety of DNS resolvers to be pushed to the clients
  • The choice to use a self-hosted resolver with Unbound.
  • Preshared-key for an extra layer of security.
  • Block DNS leaks
  • Dynamic DNS supported
  • Many other little things!

๐Ÿ’ก Options

  • PRIVATE_SUBNET_V4 - private IPv4 subnet configuration 10.8.0.0/24 by default
  • PRIVATE_SUBNET_V6 - private IPv6 subnet configuration fd42:42:42::0/64 by default
  • SERVER_HOST_V4 - public IPv4 address, detected by default using curl
  • SERVER_HOST_V6 - public IPv6 address, detected by default using curl
  • SERVER_PUB_NIC - public nig address, detected by default
  • SERVER_PORT - public port for wireguard server, default is 51820
  • DISABLE_HOST - Disable or enable ipv4 and ipv6, default disabled
  • CLIENT_ALLOWED_IP - private or public IP range allowed in the tunnel
  • NAT_CHOICE - Keep sending packets to keep the tunnel alive 25
  • INSTALL_UNBOUND - Install unbound settings y/n
  • DNS_CHOICE - Without Unbound you have to use a public dns like 8.8.8.8
  • CLIENT_NAME - name of the client
  • MTU_CHOICE - the MTU the client will use to connect to DNS 1420

๐Ÿ‘‰๐Ÿ‘ˆ Compatibility with Linux Distro

OS Supported i386 amd64 armhf arm64
Ubuntu 14 โ‰ค โŒ โŒ โŒ โŒ โŒ
Ubuntu 16 โœ”๏ธ โœ”๏ธ โœ”๏ธ โœ”๏ธ โœ”๏ธ
Ubuntu 18 โœ”๏ธ โœ”๏ธ โœ”๏ธ โœ”๏ธ โœ”๏ธ
Ubuntu 19 โ‰ฅ โœ”๏ธ โœ”๏ธ โœ”๏ธ โœ”๏ธ โœ”๏ธ
Debian 7 โ‰ค โŒ โŒ โŒ โŒ โŒ
Debian 8 โœ”๏ธ โœ”๏ธ โœ”๏ธ โœ”๏ธ โœ”๏ธ
Debian 9 โœ”๏ธ โœ”๏ธ โœ”๏ธ โœ”๏ธ โœ”๏ธ
Debian 10 โ‰ฅ โœ”๏ธ โœ”๏ธ โœ”๏ธ โœ”๏ธ โœ”๏ธ
CentOS 6 โ‰ค โŒ โŒ โŒ โŒ โŒ
CentOS 7 โœ”๏ธ โœ”๏ธ โœ”๏ธ โœ”๏ธ โœ”๏ธ
CentOS 8 โ‰ฅ โœ”๏ธ โœ”๏ธ โœ”๏ธ โœ”๏ธ โœ”๏ธ
Fedora 29 โ‰ค โŒ โŒ โŒ โŒ โŒ
Fedora 30 โœ”๏ธ โœ”๏ธ โœ”๏ธ โœ”๏ธ โœ”๏ธ
Fedora 31 โœ”๏ธ โœ”๏ธ โœ”๏ธ โœ”๏ธ โœ”๏ธ
Fedora 32 โ‰ฅ โœ”๏ธ โœ”๏ธ โœ”๏ธ โœ”๏ธ โœ”๏ธ
RedHat 6 โ‰ค โŒ โŒ โŒ โŒ โŒ
RedHat 7 โœ”๏ธ โœ”๏ธ โœ”๏ธ โœ”๏ธ โœ”๏ธ
RedHat 8 โ‰ฅ โœ”๏ธ โœ”๏ธ โœ”๏ธ โœ”๏ธ โœ”๏ธ
Arch โœ”๏ธ โœ”๏ธ โœ”๏ธ โœ”๏ธ โœ”๏ธ
Raspbian โœ”๏ธ โœ”๏ธ โœ”๏ธ โœ”๏ธ โœ”๏ธ

โ˜๏ธ Compatibility with Cloud Providers

Cloud Supported
AWS โœ”๏ธ
Google Cloud โœ”๏ธ
Linode โœ”๏ธ
Digital Ocean โœ”๏ธ
Vultr โœ”๏ธ
Microsoft Azure โœ”๏ธ
OpenStack โœ”๏ธ
Rackspace โœ”๏ธ
Scaleway โœ”๏ธ
EuroVPS โœ”๏ธ
Hetzner Cloud โŒ
Strato โŒ

๐Ÿ›ก๏ธ Compatibility with Virtualization

Virtualization Supported
KVM โœ”๏ธ
LXC โŒ
OpenVZ โŒ
Docker โŒ

๐Ÿ’ป Compatibility with Linux Kernel

Kernel Supported
Kernel 5.4 โ‰ฅ โœ”๏ธ
Kernel 4.19 โœ”๏ธ
Kernel 4.14 โœ”๏ธ
Kernel 4.9 โœ”๏ธ
Kernel 4.4 โœ”๏ธ
Kernel 3.16 โœ”๏ธ
Kernel 3.1 โ‰ค โŒ

๐Ÿ™‹ Q&A

Which hosting provider do you recommend?

  • Google Cloud: Worldwide locations, starting at $10/month
  • Vultr: Worldwide locations, IPv6 support, starting at $3.50/month
  • Digital Ocean: Worldwide locations, IPv6 support, starting at $5/month
  • Linode: Worldwide locations, IPv6 support, starting at $5/month

Which WireGuard client do you recommend?

Is there WireGuard documentation?

How do I install a wireguard without the questions? (Headless Install) Server Only

  • HEADLESS_INSTALL=y /etc/wireguard/wireguard-server.sh

Official Links


๐Ÿ“ Architecture

image


๐Ÿค Developing

Using a browser based development environment:

Open in Gitpod

๐Ÿ› Debugging

git clone https://github.com/complexorganizations/wireguard-manager /etc/wireguard/
bash -x /etc/wireguard/wireguard-(server|client).sh >> /etc/wireguard/wireguard-(server|client).log

๐Ÿ‘ค Author


โ›‘๏ธ Support

Give a โญ๏ธ and ๐Ÿด if this project helped you!

Sponsors

  • BCH : qzq9ae4jlewtz7v7mn4tv7kav3dc9rvjwsg5f36099
  • BSV : ``
  • BTC : 3QgnfTBaW4gn4y8QPEdXNJY6Y74nBwRXfR
  • DAI : 0x8DAd9f838d5F2Ab6B14795d47dD1Fa4ED7D1AcaB
  • ETC : 0xd42D20D7E1fC0adb98B67d36691754E3F944478A
  • ETH : 0xe000C5094398dd83A3ef8228613CF4aD134eB0EA
  • LTC : MVwkmnnaLDq7UccDeudcpQYwFnnDwDxxmq
  • XRP : rw2ciyaNshpHe7bCHo4bRWq6pqqynnWKQg (1790476900)

โค๏ธ Credits

Angristan l-n-s


๐Ÿ“ License

Copyright ยฉ 2020 Prajwal

This project is MIT licensed.

wireguard-manager's People

Contributors

zfz7 avatar

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.