This repo aims to simplify routine operations with WireGuard
Medium article: How to deploy WireGuard node on a DigitalOcean's droplet
wget https://raw.githubusercontent.com/drew2a/wireguard/master/wg-ububtu-server-up.sh
chmod +x ./wg-ububtu-server-up.sh
./wg-ububtu-server-up.sh 10
To get a full instruction, please follow to the article above.
This script:
- Installs all necessary software on an empty Ubuntu DigitalOcean droplet (it should also work with most modern Ubuntu images)
- Configures IPv4 forwarding and iptables rules
- Sets up unbound dns resolver
- Creates a server and clients configurations
- Installs qrencode
- Runs WireGuard
wg-ubuntu-server-up.sh [<number_of_clients>]
./wg-ubuntu-server-up.sh
./wg-ubuntu-server-up.sh 10
This script generate server and clients configs for WireGuard.
If the public IP is not defined, then the public IP of the machine from which the script is run is used. If the number of clients is not defined, then used 10 clients.
Install WireGuard if it's not installed.
./wg-genconf.sh [<number_of_clients> [<server_public_ip>]]
./wg-genconf.sh
./wg-genconf.sh 10
./wg-genconf.sh 10 157.245.73.253