Skip to content

jurgispods/pihole-vpn-google-cloud

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Installation

Prerequisites

  • terraform
  • gcloud (from Google Cloud SDK)

Setup Google Cloud Account and Project

Create Infrastructure

Authenticate Terraform to create resources on your behalf. Either:

  1. Quick and easy: Run gcloud auth application-default login
  2. Recommended for production:

Insert your project ID as a value for the key project in provider.tf.

terraform init
terraform plan
terraform apply

Configure Client Device(s)

First client

The first client config is already created after the infrastructure is set up.

A QR code of the Wireguard config can be obtained by calling:

gcloud beta compute ssh --zone "us-east1-b" "root@pihole" --project <project-id> --command 'cat /root/wg0-client-2.conf | qrencode -t ansiutf8 -l L'

Alternatively, download the client config file directly:

gcloud beta compute scp --zone "us-east1-b" --project <project-id> root@pihole:/root/wg0-client-2.conf .

Additional clients

For a new client config (e.g. for another device):

cat setup.sh | gcloud beta compute ssh --zone "us-east1-b" "root@pihole" --project <project-id> --command "bash -s /dev/stdin client"

This will out a QR code, as above. To download the new client config:

gcloud beta compute scp --zone "us-east1-b" --project <project-id> root@pihole:/root/wg0-client-3.conf .

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published