Skip to content
ํ”„๋กœ์ ํŠธ

์†Œ๊ฐœ

๐Ÿ›ก๏ธ ๐Ÿ”’ WireGuard๋ฅผ ์‚ฌ์šฉํ•ด ์ž์‹ ๋งŒ์˜ VPN ์„œ๋น„์Šค๋ฅผ ๊ฐ„๋‹จํ•˜๊ฒŒ ์ƒ์„ฑํ•˜๊ณ  ์‚ญ์ œํ•  ์ˆ˜ ์žˆ๋„๋ก ํ•˜๋Š” ๊ฒƒ์ด ์ด ํ”„๋กœ์ ํŠธ์˜ ๋ชฉํ‘œ์ž…๋‹ˆ๋‹ค.

์‹œ์Šคํ…œ ๋ฐ ์ธํ”„๋ผ

์ด ์ˆ˜์น˜๋ฅผ ์ธก์ •ํ•˜๋Š” ๋ฐฉ๋ฒ•

์ธก์ •๋œ ์Šคํƒ€ ์ฆ๊ฐ€

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
๊ธฐ๋ก ์ˆ˜์ง‘ ์ค‘

์„œ๋กœ ๊ฒน์น˜๋Š” ๊ธฐ๊ฐ„์˜ ์ˆœ์ฆ๊ฐ€๋Ÿ‰์ด๋ฉฐ ์ผ๋ณ„ ํ•ฉ๊ณ„๊ฐ€ ์•„๋‹™๋‹ˆ๋‹ค. ์ธก์ •๊ฐ’์ด ์—†์œผ๋ฉด ๋น„์›Œ ๋‘ก๋‹ˆ๋‹ค. ์Šคํƒ€๋Š” ๊ด€์‹ฌ๋„๋ฅผ ๋‚˜ํƒ€๋‚ด๋ฉฐ ํ’ˆ์งˆ์„ ๋ณด์žฅํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

README.md

Original

About The Project

This project's goal is to be simple to create and destroy your own VPN service using WireGuard.

Prerequisites

  • Terraform >= 1.0.0
  • Ansible >= 2.10.5

How to Deploy

Terraform

Run with sudo is necessary because we need permission on localhost to install packages, configure a network interface and start a process.

Select your cloud provider AWS, DigitalOcean, GCP and open the directory

You can change the region or key name in the variable.tf

  • Initialize Terraform
sudo terraform init
  • Plan our modifications
sudo terraform plan
  • Apply the changes
sudo terraform apply
  • For Digital Ocean you need to declare your token(do_token) in variable.tf or command line:
sudo terraform plan -var "do_token=value"
sudo terraform apply -var "do_token=value"
  • For GCP you need to declare your token(project_id) in variable.tf or command line:
sudo terraform plan -var "project_id=value"
sudo terraform apply -var "project_id=value"

You supply the key to Terraform using the environment variable GOOGLE_APPLICATION_CREDENTIALS:

export GOOGLE_APPLICATION_CREDENTIALS=path
  • For AWS you need to configure your credentials using the follow command:
sudo aws configure

Or you can use your credentials as environment variable:

export AWS_ACCESS_KEY_ID=
export AWS_SECRET_ACCESS_KEY=

Tests - Checking the IP

  • Test the connection without VPN
curl ipinfo.io/ip
  • Start VPN
sudo systemctl start wg-quick@wg0
  • Test the connection with VPN
curl ipinfo.io/ip

Mobile client

If you want a extra client for mobile, you need to change the value of the variable mobile in variable.tf or command line:

sudo terraform plan -var "mobile=true"
sudo terraform apply -var "mobile=true"

If variable enabled it will be installed the package qrencode for generate a QRCODE with the configuration for configure in your mobile device.

After the execution it will be genered a QRCODE in stdout terraform, just scan in your mobile device.

Tested with the Android WireGuard Client

๐Ÿงน Cleanup

  • Just run:
sudo terraform destroy

โ˜๏ธ Cloud Providers

  • AWS
  • Digital Ocean
  • GCP
  • Azure
  • OCI

๐Ÿค Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues.

๐Ÿ›ฃ๏ธ Roadmap

  • Work๐Ÿคฃ
  • Linux client(Debian, RedHat and Arch base)
  • Terraform to deploy server on AWS
  • Mobile client
  • Mac client
  • Add other cloud providers

Author

๐Ÿ‘ค Joรฃo Freire

๊ด€๋ จ ํ”„๋กœ์ ํŠธ ์‚ดํŽด๋ณด๊ธฐ

๋ถˆ๋Ÿฌ์˜ค๋Š” ์ค‘โ€ฆ