Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/michaelbeaumont/livewire
Livewire makes it easy to set up an ephemeral VPN using wireguard.
https://github.com/michaelbeaumont/livewire
gcp wireguard wireguard-vpn
Last synced: 23 days ago
JSON representation
Livewire makes it easy to set up an ephemeral VPN using wireguard.
- Host: GitHub
- URL: https://github.com/michaelbeaumont/livewire
- Owner: michaelbeaumont
- Created: 2020-07-31T22:25:42.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-06-01T21:02:27.000Z (over 3 years ago)
- Last Synced: 2024-11-03T07:25:56.527Z (2 months ago)
- Topics: gcp, wireguard, wireguard-vpn
- Language: Python
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Livewire
Livewire makes it easy to set up an ephemeral VPN using wireguard
running in GCP. It uses
[michaelbeaumont/wireform](https://github.com/michaelbeaumont/wireform)
to setup a GCP VM with wireguard and generate the private key entirely in the
VM, exporting only the public key.It requires `wg` and `terraform`.
Python dependencies are managed using `poetry`.```
$ poetry install
$ poetry run ./main.py init
$ poetry run ./main.py up -o wg0.conf -t wg0.tmpl
```## Config
Configure livewire with a `config.json` file in `${XDG_CONFIG_HOME}/livewire`
and replace `<...>`s:```
{
"init": {
"region": "us-east1",
"billing_account": ""
},
"instance": {
"source_ranges": [
""
],
"client": {
"public_key": "",
// or: "private_key": "",
"allowed_ips": ""
},
"other_peers": []
}
}
```along with a template `conf.tmpl` for _your client_ `wg-quick` config
(`{...}`s are replaced by `livewire`):```
[Interface]
Address =
{interface_extra} # important for MTU issues with GCP
PrivateKey = {private_key} # if you put it in the livewire config
DNS = 1.1.1.1PreUp = ./wg-vpn PreUp
PostUp = ./wg-vpn PostUp
PreDown = ./wg-vpn PreDown
PostDown = ./wg-vpn PostDown[Peer]
PublicKey = {peer.public_key} # generated on the peer in GCP
Endpoint = {peer.ip}:{peer.port} # IP of peer in GCP
AllowedIPs = 0.0.0.0/0 # route all traffic through this peer
```