Code Monkey home page Code Monkey logo

tfvpn's Introduction

tfvpn

Deploy your private VPN service on Linode. Full automation and rapid deployment.

Description

This project uses Terraform to fully automate the deployment of the hwdsl2/setup-ipsec-vpn VPN project on Linode. Run your self-hosted IPSec VPN service with one click.

Prerequisites

You need the following to deploy your own VPN service with this automation project:

Installation

To deploy your VPN service, simply run the following commands:

  1. Clone the repository:

    git clone https://github.com/gszathmari/tfvpn.git
  2. Change your working directory:

    cd tfvpn/
  3. Initialise Terraform before the first use:

    terraform init
  4. Edit the terraform.tfvars file to choose your favourite geographical region for your VPN service.

  5. Then run terraform apply to launch the hosting infrastructure:

    terraform apply
  6. Enter your Linode API key when prompted.

  7. Answer yes to confirm the deployment. If everything ran successfully, the Linode dashboard should display the virtual machine running our new VPN service.

  8. Once Terraform finishes the deployment of tfvpn, wait a minute or two and your VPN service is ready to accept new connections.

  9. The VPN connection details are the following:

    • IP address: Run terraform show -json | jq -r .values.outputs.ipv4.value to display.
    • Username: Fixed to vpnuser
    • Password: Run terraform show -json | jq -r .values.outputs.password.value to display.
    • IPSec PSK: Run terraform show -json | jq -r .values.outputs.psk.value to display.

Client configuration

To configure Windows, Linux, macOS, iOS and Android clients, refer to the hwdsl2 client configuration guide. Use the connection parameters shown on the terminal screen from the previous step.

Destroying the VPN

If your tfvpn VPN service is no longer needed, it is easy to delete everything with Terraform again:

  1. Change your working directory:

    cd tfvpn/
  2. Run Terraform with the destroy parameter this time.

    terraform destroy
  3. Enter the Linode API key and answer 'yes' to confirm the deletion of your hosting infrastructure.

Once Terraform manages to clean up the virtual machine, Linode should stop billing for the service.

Further reading

Acknowledgments

tfvpn's People

Contributors

gszathmari avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

tfvpn's Issues

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.