Coder Social home page Coder Social logo

its0x08 / wg-install Goto Github PK

View Code? Open in Web Editor NEW
149.0 10.0 11.0 102 KB

Wireguard auto-installer for Ubuntu, Debian, CentOS and Fedora

Shell 100.00%
wireguard vpn vpn-server vpn-client vpn-manager secure-by-default state-of-the-art fast kernel-module low-bandwidth

wg-install's Introduction

wg-install v0.1.01

WireGuard autoinstaller written in Bash

WireGuard road warrior installer for Ubuntu, Debian, CentOS and Fedora!

This script will install automatically the Wireguard server and generate client configuration files for a secure connection.

Visitors Semgrep Codacy Security Scan

Usage command

Oneliners:

wget http://git.io/Jff1k -qO wg.sh && bash wg.sh
curl http://git.io/Jff1k -sSLo wg.sh && bash wg.sh
/bin/bash -c "$(curl -fsSL http://git.io/Jff1k)"

Steps to download and run the scripts:

git clone https://github.com/its0x08/wg-install.git
cd wg-install
bash wg-install.sh

Add new client or remove and uninstall WireGuard

You can run it again to generate more users after the first run, or remove WireGuard. Reboot your server to apply all settings.

To start/activate the Wireguard client:

wg-quick up config_name

Options:

The script can be configured by setting the following environment variables:

  • INTERACTIVE - if set to "no", the script will not prompt for user input
  • PRIVATE_SUBNET - private subnet configuration, (default: 10.9.0.0/24)
  • SERVER_HOST - public IP address, detected by default
  • SERVER_PORT - listening port, picked randomly by default
  • CLIENT_DNS - comma serparated DNS servers to use by the client
  • ADD_REMOVE - set to 1 to remove WireGuard or 2 to add new users
  • WG_CONFIG - set config location (default: /etc/wireguard/wg0.conf)

Copy the file /root/client-wg0.conf from a remote server to your local PC path /etc/wireguard/wg0.conf and run sudo systemctl start [email protected] or you can use the QR code generated by this script to auto-add mobile clients.

Server/Client status:

To check VPN status, run wg.

Pull Requests are appreciated

Enjoy it !

Note: dont forget to report bugs please!!

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.