2021-03-15 11:03:49 -07:00
|
|
|
# vpn-stack
|
2021-01-25 15:37:53 -08:00
|
|
|
|
|
|
|
A set of bash scripts for installing and managing a WireGuard VPN server.
|
|
|
|
|
2024-07-24 14:00:18 -07:00
|
|
|
## Requirements
|
|
|
|
A minimal Debian 12 server install with no extra services or packages installed.
|
|
|
|
It is recommended to first install base-stack which will configure a basic server set up including firewald & fail2ban to secure the server:
|
|
|
|
https://git.stack-source.com/msb/base-stack
|
2021-01-25 15:37:53 -08:00
|
|
|
|
2024-07-24 14:00:18 -07:00
|
|
|
## Install
|
2021-01-25 15:37:53 -08:00
|
|
|
|
|
|
|
```bash
|
|
|
|
cd /usr/local/src/
|
2024-07-24 14:00:18 -07:00
|
|
|
git clone https://git.stack-source.com/msb/vpn-stack.git
|
2022-07-14 13:27:17 -07:00
|
|
|
cd vpn-stack
|
|
|
|
bash install.sh
|
2021-01-25 15:37:53 -08:00
|
|
|
```
|
|
|
|
|
|
|
|
## Configure Clients
|
|
|
|
|
|
|
|
Download and install client software from [wireguard.com](https://www.wireguard.com/install/).
|
|
|
|
|
2024-07-24 14:00:18 -07:00
|
|
|
Add a client configuration to the server, display a qr code that can be scanned by a client, and email a zipped copy of the config.
|
2021-01-25 15:37:53 -08:00
|
|
|
|
|
|
|
```bash
|
2024-07-24 14:00:18 -07:00
|
|
|
wg-client-add.sh -c <client>
|
|
|
|
wg-client-qr-display.sh -c <client>
|
|
|
|
wg-client-zip-email.sh -c <client> -e <email>
|
2021-01-25 15:37:53 -08:00
|
|
|
```
|
|
|
|
|
2024-07-24 14:00:18 -07:00
|
|
|
For example, to add a client config for a user named joe, display the qr code on the console screen, and then email a zipped copy of the config run:
|
2021-01-25 15:37:53 -08:00
|
|
|
|
|
|
|
```bash
|
2024-07-24 14:00:18 -07:00
|
|
|
wg-client-add.sh -c joe
|
|
|
|
wg-client-qr-display.sh -c joe
|
|
|
|
wg-client-zip-email.sh -c joe -e joe@example.com
|
2021-01-25 15:37:53 -08:00
|
|
|
```
|
|
|
|
|
2022-07-14 12:35:44 -07:00
|
|
|
## License
|
2024-07-24 14:00:18 -07:00
|
|
|
Copyright (c) 2024 Matthew Saunders Brown <matthewsaundersbrown@gmail.com>\
|
2022-07-14 12:35:44 -07:00
|
|
|
GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|