Giter VIP home page Giter VIP logo

ansible-role-pivpn's Introduction

PiVPN

This role install and configure OpenVPN in a Raspberry Pi with Raspbian.

Requirements

This role requires Ansible 2.0 or higher and a clean installation of Raspbian. Eth0 must be configured with a static IP.

Role Variables

The variables that can be passed to this role and a brief description about them are as follows.

(defaults/main.yml)

certificate:
  key_size: 1024 # If you are paranoid you can change for 2048
  key_country: "ES" # Country Name (2 letter code)
  key_province: "Seville" # State or Province Name (full name)
  key_city: "" # Locality Name (eg, city)
  key_org: "ACME Ltd." # Organization Name (eg, company)
  key_email: "" # Email Address
  key_ou: "" # Organizational Unit Name (eg, section)


openvpn:
  protocol: udp # UDP is recommended. You can change fot TCP.
  port: 1194 # This is the default OpenVPN port. Remember open this port in your router to allow the VPN connection from Internet.
  server_subnet: 10.8.0.0 # The subnet you want to use for the OpenVPN clients
  server_netmask: 255.255.255.0 # The netmask for the OpenVPN client subnet
  server_tun0: 10.8.0.1 # The IP for the OpenVPN tunnel interface
  server_tun0_ptp: 10.8.0.2 # The IP for the OpenVPN tunnel point-to-point alias
  local_subnet: 192.168.0.0 # The local subnet where the Raspberry Pi is connected
  local_netmask: 255.255.255.0 # The local netmask for the Raspberry Pi subnet
  dns_ip: 192.168.0.1 # If your router does not do DNS, you can use Google DNS 8.8.8.8

(defaults/credentials.yml)

# You can use Ansible Vault to encrypt your credentials file. Also, change the file permissions to 0600
#   ansible-vault encrypt <role_path>/defaults/credentials.yml

# If you want to create an initial client, complete the variables
client:
  username: "" # OpenVPN client username
  password: "" # OpenVPN client password

Dependencies

None

Example Playbook

If you encrypt the credentials.yml file, remember to run your playbook with the flag '--ask-vault-pass'.

- hosts: pi
  role: pipoe2h.pivpn

License

MIT

Author Information

ansible-role-pivpn's People

Contributors

pipoe2h 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.