项目作者: l-n-s

项目描述 :
WireGuard VPN server installer
高级语言: Shell
项目地址: git://github.com/l-n-s/wireguard-install.git
创建时间: 2018-12-10T07:36:28Z
项目社区:https://github.com/l-n-s/wireguard-install

开源协议:MIT License

下载


wireguard-install

This repository is no longer maintained due to lack of time. Use some other scripts instead.

WireGuard road warrior installer for Ubuntu 18.04 LTS, Debian 9 and CentOS 7.

This script will let you setup your own VPN server in no more than a minute, even if you haven’t used WireGuard before. It has been designed to be as unobtrusive and universal as possible.

Usage

Run the script and follow the assistant:

  1. wget https://raw.githubusercontent.com/l-n-s/wireguard-install/master/wireguard-install.sh -O wireguard-install.sh
  2. bash wireguard-install.sh

Once it ends, you can run it again to add more users. Reboot your server to apply all settings.

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, “10.9.0.0/24” by default
  • SERVER_HOST - public IP address, detected by default
  • SERVER_PORT - listening port, picked random by default
  • CLIENT_DNS - comma separated DNS servers to use by the client

Setting up clients

Ubuntu PC

Install WireGuard and reboot your computer:

  1. sudo add-apt-repository ppa:wireguard/wireguard -y && sudo apt update && sudo apt install wireguard resolvconf -y
  2. sudo reboot

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 wg-quick@wg0.service

To show VPN status, run sudo wg show.

Credits

Inspired by Nyr’s openvpn-install.