Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/zbo14/wirevpn-server

Run a WireGuard VPN server on Ubuntu
https://github.com/zbo14/wirevpn-server

bash ubuntu vpn wireguard

Last synced: 6 days ago
JSON representation

Run a WireGuard VPN server on Ubuntu

Awesome Lists containing this project

README

        

# wirevpn-server

Some scripts and config files to run a WireGuard VPN server on Ubuntu.

The VPN host runs an Unbound DNS server to handle client requests/prevent [DNS leaking](https://en.wikipedia.org/wiki/DNS_leak). By default, the VPN queries upstream DNS servers at Quad9/Cloudflare and sends requests over TLS.

## Install

`$ sh scripts/install.sh`

Install WireGuard, Unbound, and other required packages.

### Setup

`$ sh scripts/setup.sh`

This script does the following:

1. Generate public and private keys and write them to `~/.wireguard`
1. Encrypt the private key with a GPG key of your choosing
1. Write a WireGuard config to `/etc/wireguard`
1. Write the public key to stdout

### Start

`$ sh scripts/start.sh`

This script does the following:

1. Bring up the WireGuard interface
1. Decrypt your private key with the GPG key you chose
1. Set the private key on the interface

### Add client

```
$ sh scripts/addclient.sh

Arguments:
ip - the desired tunnel IP address for the client
pubkey - the client's public key
presharedkey - the client's preshared key
```

### Remove client

```
$ sh scripts/rmclient.sh

Arguments:
pubkey - the client's public key
```

### Stop

`$ sh scripts/stop.sh`

Bring down the WireGuard interface.