Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/its0x08/wg-install
Wireguard auto-installer for Ubuntu, Debian, CentOS and Fedora
https://github.com/its0x08/wg-install
autoinstall bash centos debian encryption fast kernel-module linux low-bandwidth oneliner redhat script secure-by-default state-of-the-art ubuntu vpn vpn-client vpn-manager vpn-server wireguard
Last synced: 3 months ago
JSON representation
Wireguard auto-installer for Ubuntu, Debian, CentOS and Fedora
- Host: GitHub
- URL: https://github.com/its0x08/wg-install
- Owner: its0x08
- Created: 2019-01-16T11:55:53.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-04-30T13:38:32.000Z (9 months ago)
- Last Synced: 2024-08-02T18:43:25.324Z (6 months ago)
- Topics: autoinstall, bash, centos, debian, encryption, fast, kernel-module, linux, low-bandwidth, oneliner, redhat, script, secure-by-default, state-of-the-art, ubuntu, vpn, vpn-client, vpn-manager, vpn-server, wireguard
- Language: Shell
- Homepage:
- Size: 99.6 KB
- Stars: 150
- Watchers: 10
- Forks: 11
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# wg-install v0.1.01
WireGuard autoinstaller written in Bash[WireGuard](https://www.wireguard.com) [road warrior](http://en.wikipedia.org/wiki/Road_warrior_%28computing%29) 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](https://api.visitorbadge.io/api/visitors?path=https%3A%2F%2Fgithub.com%2Fits0x08%2Fwg-install&countColor=%232ccce4&style=flat-square)
[![Semgrep](https://github.com/its0x08/wg-install/actions/workflows/semgrep.yml/badge.svg)](https://github.com/its0x08/wg-install/actions/workflows/semgrep.yml)
[![Codacy Security Scan](https://github.com/its0x08/wg-install/actions/workflows/codacy.yml/badge.svg)](https://github.com/its0x08/wg-install/actions/workflows/codacy.yml)## Usage command
### Oneliners:
```bash
wget http://git.io/Jff1k -qO wg.sh && bash wg.sh
```
```bash
curl http://git.io/Jff1k -sSLo wg.sh && bash wg.sh
```
```bash
/bin/bash -c "$(curl -fsSL http://git.io/Jff1k)"
```### Steps to download and run the scripts:
```bash
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:
```bash
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!!