Git Product home page Git Product logo

pi_openvpn's Introduction

Pi OpenVPN

Ansible playbook to install OpenVPN on a Raspberry Pi

Quick instructions

  1. Download Raspbian Jessie lite from raspberrypi.org and install it on your Raspberry Pi
  2. Clone this repository:

    $ git clone [email protected]:beenje/pi_openvpn.git
  3. Build the Diffie-Hellman key:

    $ wget https://github.com/OpenVPN/easy-rsa/releases/download/3.0.1/EasyRSA-3.0.1.tgz
    $ tar xfz EasyRSA-3.0.1.tgz
    $ cd EasyRSA-3.0.1
    $ ./easyrsa init-pki
    $ ./easyrsa gen-dh
  4. The generated key is EasyRSA-3.0.1/pki/dh.pem
  5. Update the variables in host_vars/raspberry. You should at least define:

    # Static Internet hostname
    openvpn_server: my.raspberry.example.org
    # List of client configurations to create
    openvpn_clients:
      - client1
      - client2
    # List of subnets behind the server you want to access
    # You probably want to put your internal LAN
    private_subnets:
      - 192.168.10.0 255.255.255.0
    # Full path of the Diffie-Hellman key generated locally
    openvpn_dh: /path/to/dh.pem
  6. Run the playbook:

    $ ansible-playbook -i hosts openvpn.yml
  7. Get the clients configuration files from the Raspberry Pi:

    $ scp pi@raspberry:openvpn/clientside/files/*.ovpn .
  8. Don't leave all the generated keys on your Pi! Even the CA is created with no password. Anyone accessing it could sign new requests! You can copy the openvpn directory to a USB stick before to remove it.

pi_openvpn's People

Contributors

starbugs avatar

Stargazers

 avatar

Watchers

 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.