Skip to content

Commit

Permalink
Merge pull request #2 from hazelops/feature/initial
Browse files Browse the repository at this point in the history
Add template for WireGuard GUI client to README.md
  • Loading branch information
kobrikx authored Aug 11, 2021
2 parents b7a87c7 + de3784e commit 23a99fe
Showing 1 changed file with 29 additions and 3 deletions.
32 changes: 29 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,45 @@ Before using this module, you'll need to:

1. Install the [WireGuard tools](https://www.wireguard.com/install/) for your OS.

2. Generate a key pair for each client:
2. Generate a key pair for each client with a WireGuard tool:
```bash
wg genkey | tee client1-privatekey | wg pubkey > client1-publickey
```

3. Generate a key pair for the server
3. Generate a key pair for the server with a WireGuard tool:
```bash
wg genkey | tee server-privatekey | wg pubkey > server-publickey
```
4. Add each client's public key, along with the next available IP address to the `wg_clients` list.

5. Add server's private key to the `wg_server_private_key` variable. You can use AWS SSM Parameter store to store and read server private key.

5.1 To store the private key you could use this command:

```shell
aws ssm put-parameter --name /wireguard/wg-server-private-key --type SecureString --value <Your Server Private Key>
```

6. To create working configuration for the GUI WireGuard client, you should create a conf file from this template:

```toml
[Interface]
PrivateKey = <Your Client Private Key>
ListenPort = 51820
Address = 10.0.0.4/32 # Set your client's local ip address
DNS = 8.8.8.8
[Peer]
PublicKey = <Public Key of Your WireGuard Server>
AllowedIPs = 10.0.0.0/24
Endpoint = <IP or Domain Name of Your WireGuard Server>:51820
PersistentKeepalive = 25
```

Save this file as `<Your VPN Name>.conf`. Then you could import your configuration in WireGuard GUI client or share it with end users.

If you want to save or share more than one conf file - you can add them to single zip file without folders.

WireGuard GUI client support import of zipped configurations.

<!-- BEGINNING OF GENERATED BY TERRAFORM-DOCS -->

Expand Down

0 comments on commit 23a99fe

Please sign in to comment.