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 muliple computers] involved.
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 themself to each other, which is done by keys. There are multiple ways to generate your keys. Here is one.
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 &quot;tinc generate-keys 4096&quot;</pre>
<pre>nix-shell -p tinc_pre --run &quot;tinc generate-keys 4096&quot;</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. Asuming we have generated keys for the 2 machines and they are stored in the folders <code>heinz</code> and <code>peter</code>.
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 &gt;hosts_heinz &lt;&lt;EOF
<pre>cat &gt;hosts_heinz &lt;&lt;EOF
Line 60: Line 60:
== Setup interface ==
== Setup interface ==


We have to configure the tinc tunel interface.
We have to configure the tinc tunnel interface.


=== networking.interfaces ===
=== networking.interfaces ===


The simplest way is to use the networing module. But it has some minor flaws on package updates.
The simplest way is to use the networking module. But it has some minor flaws on package updates.


<pre># for heinz
<pre># for heinz