|
| 1 | +# Overview |
| 2 | + |
| 3 | +Idea to create a easy-to-use wrapper over [tinc vpn](https://www.tinc-vpn.org). |
| 4 | + |
| 5 | +Tinc VPN - is full-mesh, auto-healing, time-proofed VPN system without single point of failure, with high-throughput and |
| 6 | +serious cryptography. |
| 7 | +All nodes in a Tinc network are fully equal. New nodes discovering full topology through any entry point. |
| 8 | +Node may interact with each other even if they don't have direct connections. |
| 9 | + |
| 10 | +Tinc is a great and have a lot of features. It's ideal for a complicated situations (China, Russia and others). |
| 11 | +I really admire the project. |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | +**But...** it's pain to configure and maintain. |
| 16 | + |
| 17 | +Pain to create a new node. Pain to add new node to network. |
| 18 | + |
| 19 | +Minimal configuration for a first public node: |
| 20 | + |
| 21 | +* 2 files (tinc.conf, hostfile), |
| 22 | +* 1 script (tinc-up), |
| 23 | +* 2 directories (net, hosts), |
| 24 | +* 1 command execution (key generation). |
| 25 | + |
| 26 | +(let's not count service initialization and other common stuff) |
| 27 | + |
| 28 | +Second node adds key exchange (+1 operation if we will use `rsync`, or +2 operations if manually). |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | +Next new public nodes require increasing number of additional operations (+N operations, where N is a number of public nodes). |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | +> To be honest, to just to connect to the network an only single key exchange operation required: with any public node. |
| 38 | +> Than tincd will discover all other nodes. |
| 39 | +> |
| 40 | +> **But** after your node disconnect/reboot and in case of death of your entry node you will be no more able to connect |
| 41 | +> to other alive nodes (because they don't know your key and your node don't know theirs). |
| 42 | +
|
| 43 | + |
| 44 | + |
| 45 | +**Tinc-boot** - is a all-in-one tool with zero dependency (except `tinc` of course), that aims to achieve: |
| 46 | + |
| 47 | +1. one-line node initialization |
| 48 | +2. automatic keys distribution |
| 49 | +3. simplified procedure to add new node to existent net |
| 50 | + |
| 51 | + |
| 52 | +## Installation |
| 53 | + |
| 54 | +* (recommended) look at releases page and download |
| 55 | +* build from source `go get -v github.com/reddec/tinc-boot/cmd/...` |
| 56 | + |
| 57 | +### Build requirements |
| 58 | + |
| 59 | +* go 1.13+ |
| 60 | + |
| 61 | +## Runtime requirements |
| 62 | + |
| 63 | +* Linux |
| 64 | +* `tincd 1.10.xx` |
| 65 | +* `bash` |
| 66 | +* (recommended) `systemd` |
| 67 | + |
| 68 | +## Tested operation systems |
| 69 | + |
| 70 | +* Ubuntu 18.04 x64 |
| 71 | +* Archlinux (Q1 2019) x64 |
| 72 | +* Manjaro (Q1 2019) x64 |
| 73 | + |
| 74 | +Should work on all major linux systems, except generated helpers useful only for systemd-based OS. |
| 75 | + |
| 76 | + |
| 77 | +# Quick start |
| 78 | + |
| 79 | +Download/build binary to `/usr/local/bin/tinc-boot`. |
| 80 | + |
| 81 | +## First node |
| 82 | + |
| 83 | +``` |
| 84 | +sudo tinc-boot gen --standalone -a <PUBLIC ADDRESS> |
| 85 | +``` |
| 86 | + |
| 87 | +and follow recommendations |
| 88 | + |
| 89 | +### Explanation |
| 90 | + |
| 91 | +* `--standalone` means that it's a first node, no need for keys exchange |
| 92 | +* `-a <address>` sets public address of node (if exists); could be used several times |
| 93 | + |
| 94 | +Will generate all required files under `/etc/tinc/dnet`. |
| 95 | + |
| 96 | +## Turn node to boot node |
| 97 | + |
| 98 | +``` |
| 99 | +sudo tinc-boot bootnode --service --dir /etc/tinc/dnet --token <SECRETTOKEN> |
| 100 | +``` |
| 101 | + |
| 102 | +and follow recommendations |
| 103 | + |
| 104 | +### Explanation |
| 105 | + |
| 106 | +* `--service` generates systemd file to `/etc/systemd/system/tinc-boot-{net}.service` |
| 107 | +* `--dir` location of tinc configuration |
| 108 | +* `--token` set's authorization token that will be used by clients |
| 109 | + |
| 110 | +## Create another node and join to net |
| 111 | + |
| 112 | +``` |
| 113 | +sudo tinc-boot gen --token <SECRETTOKEN> <PUBLIC ADDRESS>:8655 |
| 114 | +``` |
| 115 | + |
| 116 | +> Don't forget add `-a <NODE ADDRESS>` if applicable |
| 117 | +
|
| 118 | +and follow recommendations |
| 119 | + |
| 120 | +# How it works |
| 121 | + |
| 122 | +TBD |
| 123 | + |
| 124 | +# TODO |
| 125 | + |
| 126 | +* generate script with token to redistribute all-in-one to end-users |
0 commit comments