Tinc: Difference between revisions
imported>V3vAP m Spelling |
imported>V3vAP m Spelling |
||
Line 7: | Line 7: | ||
The following tutorial will setup a very simple scenario, where you create a tinc vpn between two computers in the same network. In this scenario <code>heinz</code> will connect to <code>peter</code>. But this will make <code>heinz</code> also visible to <code>peter</code>. | The following tutorial will setup a very simple scenario, where you create a tinc vpn between two computers in the same network. In this scenario <code>heinz</code> will connect to <code>peter</code>. But this will make <code>heinz</code> also visible to <code>peter</code>. | ||
It can easily be [https://www.tinc-vpn.org/examples/ improved to a setup with | It can easily be [https://www.tinc-vpn.org/examples/ improved to a setup with multiple computers] involved. | ||
== Overview == | == Overview == | ||
Line 22: | Line 22: | ||
== Generate keys == | == Generate keys == | ||
Tinc clients need to verify | Tinc clients need to verify themselves to each other, which is done by keys. There are multiple ways to generate your keys. Here is one. | ||
<pre>nix-shell -p tinc_pre --run "tinc generate-keys 4096"</pre> | <pre>nix-shell -p tinc_pre --run "tinc generate-keys 4096"</pre> | ||
Line 43: | Line 43: | ||
Also the host files need to contain the public keys for this host. | Also the host files need to contain the public keys for this host. | ||
So lets create the two hostfiles. | So lets create the two hostfiles. Assuming we have generated keys for the 2 machines and they are stored in the folders <code>heinz</code> and <code>peter</code>. | ||
<pre>cat >hosts_heinz <<EOF | <pre>cat >hosts_heinz <<EOF | ||
Line 60: | Line 60: | ||
== Setup interface == | == Setup interface == | ||
We have to configure the tinc | We have to configure the tinc tunnel interface. | ||
=== networking.interfaces === | === networking.interfaces === | ||
The simplest way is to use the | The simplest way is to use the networking module. But it has some minor flaws on package updates. | ||
<pre># for heinz | <pre># for heinz |