Go to file
Jannik Beyerstedt cdd9bc58d2 [TIDY] Set some "diff: false", fix linter warnings 2023-04-29 00:02:07 +02:00
defaults [FIX] hostname should not have hyphens 2020-07-18 23:41:21 +02:00
handlers [TIDY] yaml auto-format 2019-11-12 21:34:32 +01:00
meta change license, add license file 2020-04-08 19:34:58 +02:00
tasks [TIDY] Set some "diff: false", fix linter warnings 2023-04-29 00:02:07 +02:00
templates Use utun device on macOS (no tuntap kext needed) 2021-03-21 12:24:22 +01:00
.gitignore [CODE] add tasks 2019-11-03 16:28:34 +01:00
LICENSE change license, add license file 2020-04-08 19:34:58 +02:00
README.md [TIDY] Update to ansible 4 module names 2021-08-28 16:48:58 +02:00

README.md

Tinc

Setup and configuration of a tinc VPN network.

Requirements

none

Role Variables

Central configuration:

  • tinc_vpn_id: name of the vpn to be created (default: vpn0)
  • tinc_central_host: hostname of the always-on server (default: hetzner-01)
  • tinc_vpn_net: local vpn network (IPv4, CIDR notation)
  • tinc_remote_nets: list of remote networks, that should be forwarded to localhost (TODO: currently only one entry supported)
    • net_cidr: IPv4 network range (CIDR notation)
    • gateway: VPN network IP address of the gateway

Configuration for each host:

  • tinc_client_ip: own IP address in the tinc-local network
  • tinc_public_addr: public domain or IP address of the central server

Dependencies

none

Example Playbook

Hostfile:

tinc:
  vars:
    tinc_vpn_net: 172.16.1.0/24
    tinc_remote_nets:
      - net_cidr: 192.168.1.0/24
        gateway: 172.16.1.2
  hosts:
    central_server:
      tinc_public_addr: central_server.example.com
      tinc_client_ip: 172.16.1.1
    remote_gateway:
      tinc_client_ip: 172.16.1.2
    localhost:
      tinc_client_ip: 172.16.1.3

Playbook:

- name: Install tinc
  hosts: tinc
  roles:
    - tinc

- name: Distribute hostfiles
  hosts: tinc
  tasks:
  - name: Tinc - Distribute hostfiles
    ansible.builtin.import_role:
      name: tinc
      tasks_from: distribute

License

GPLv3