Coder Social home page Coder Social logo

niyazialpay / digitalocean-openvpn-terraform Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 5 KB

With Terraform, you can quickly open a server on DigitalOcean and install OpenVPN, and when you're done, you can quickly delete the server.

Home Page: https://niyazi.net

HCL 100.00%
terraform cloudflare digitalocean

digitalocean-openvpn-terraform's Introduction

With this Terraform file, you can create a server on DigitalOcean and have the IPv4 address of the created server added to your domain name on CloudFlare. While creating the server, your SSH keys that you have added to DigitalOcean before are added to the server and the install.sh file is created in the /root directory. After running the install.sh file, OpenVPN Access Server is installed on the server, then Lets Encrypt SSL certificate is generated together with acme.sh and SSL certificate is installed on the OpenVPN service. Also, the server is set up with AdGuard DNS addresses. You can surf the internet without any ads during VPN connection.

How to use

  1. Rename secret_variables.tf.example file to secret_variables.tf.

  2. Create a DigitalOcean account and add your SSH keys to DigitalOcean.

  3. Create a CloudFlare account and add your domain name to CloudFlare.

  4. Create a DigitalOcean API token and add it to the DigitalOcean API token field in the secret_variables.tf Terraform file.

  5. Create a CloudFlare API token and add it to the CloudFlare API token field in the secret_variables.tf Terraform file.

  6. Add your domain name to the domain field in the secret_variables.tf Terraform file.

  7. Run the Terraform file with the following command:

    terraform init
    terraform apply
  8. After the Terraform file is finished, you can connect to the server with the following command:

    ssh root@<server_ip_address>
  9. Run the install.sh file with the following command:

    sh install.sh
  10. If you want to delete the server, you can run the following command:

    terraform destroy

digitalocean-openvpn-terraform's People

Contributors

niyazialpay avatar

Stargazers

 avatar Hasan ÜNAL avatar

Watchers

James Cloos avatar  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.