Coder Social home page Coder Social logo

vultr's Introduction

WireGuard VPN Automation with Terraform and Ansible

This project automates the deployment of a WireGuard VPN server on Vultr using Terraform and Ansible. WireGuard is a simple, fast, and modern VPN that utilizes state-of-the-art cryptography. It aims to be faster, simpler, leaner, and more useful than IPsec.

Prerequisites

You should have the following installed on your local machine:

You should also have a Vultr API Key and an SSH Key ID on your Vultr account.

To obtain ssh_key_id, run:

curl -H 'Authorization: Bearer Vultr_API_KEY' https://api.vultr.com/v2/ssh-keys

Quick Start

  1. Clone this repository and navigate to the project directory.

  2. Replace VULTR_API_KEY and YOUR SSH_KEY_ID in the terraform.tfvars file with your Vultr API Key and SSH Key ID, respectively.

  3. Initialize Terraform:

    terraform init
    
  4. Apply the Terraform configuration:

    terraform apply
    

    After the apply command completes, the IP address of the newly created Vultr instance will be added automatically to the inventory.ini file.

  5. Run the Ansible playbook:

    ansible-playbook -i playbooks/inventory.ini playbooks/dwg.yml -u root
    

    This will setup the WireGuard VPN server on the Vultr instance and fetch the peer configuration files and QR code images to your local machine by default they will be placed onto your Desktop in /config and /qrcodes. This can be changed by editing the playbooks/vars/main.yml file.

  6. Connect to the VPN server using the downloaded configuration files or QR code images.

vultr's People

Contributors

cwilliams001 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.