Outils pour utilisateurs

Outils du site


tinc

Ceci est une ancienne révision du document ! —-

Table des matières

TINC

What is tinc?

tinc is a Virtual Private Network (VPN) daemon that uses tunnelling and encryption to create a secure private network between hosts on the Internet. tinc is Free Software and licensed under the GNU General Public License version 2 or later. Because the VPN appears to the IP level network code as a normal network device, there is no need to adapt any existing software. This allows VPN sites to share information with each other over the Internet without exposing any information to others. In addition, tinc has the following features:

Encryption, authentication and compression
All traffic is optionally compressed using zlib or LZO, and LibreSSL or OpenSSL is used to encrypt the traffic and protect it from alteration with message authentication codes and sequence numbers.
Automatic full mesh routing
Regardless of how you set up the tinc daemons to connect to each other, VPN traffic is always (if possible) sent directly to the destination, without going through intermediate hops.
NAT traversal
As long as one node in the VPN allows incoming connections on a public IP address (even if it is a dynamic IP address), tinc will be able to do NAT traversal, allowing direct communication between peers.
Easily expand your VPN
When you want to add nodes to your VPN, all you have to do is add an extra configuration file, there is no need to start new daemons or create and configure new devices or network interfaces.
Ability to bridge ethernet segments
You can link multiple ethernet segments together to work like a single segment, allowing you to run applications and games that normally only work on a LAN over the Internet.
Runs on many operating systems and supports IPv6
Currently Linux, FreeBSD, OpenBSD, NetBSD, OS X, Solaris, Windows 2000, XP, Vista and Windows 7 and 8 platforms are supported. See our section about supported platforms for more information about the state of the ports. tinc has also full support for IPv6, providing both the possibility of tunneling IPv6 traffic over its tunnels and of creating tunnels over existing IPv6 networks.

tinc-vpn.org

Installation

Documenation

Example

A: net 10.1.0.0 mask 255.255.0.0 gateway 10.1.54.1 internet IP 1.2.3.4
B: net 10.2.0.0 mask 255.255.0.0 gateway 10.2.1.12 internet IP 2.3.4.5
C: net 10.3.0.0 mask 255.255.0.0 gateway 10.3.69.254 internet IP 3.4.5.6
D: net 10.4.0.0 mask 255.255.0.0 gateway 10.4.3.32 internet IP 4.5.6.7

$ sudo apt update
$ sudo apt upgrade
$ sudo apt install tinc

$ sudo mkdir -p /etc/tinc/vpn0/hosts/

$ sudo vi /etc/tinc/vpn0/tinc.conf

Append the following:

Name = serverA
Device = /dev/net/tun
BindToAddress = 1.2.3.4
AddressFamily = ipv4

$ sudo tincd -n vpn0 -K4096

$ sudo vi /etc/tinc/vpn0/hosts/serverA

Subnet = 10.1.0.0/16 Subnet = 172.16.1.1/32
Address = 1.2.3.4
Address = 192.168.4.5

$ sudo vi /etc/tinc/vpn0/tinc-up

Append the following:
#!/bin/sh
#
# Must use IP 10.1.0.0, which is setup in /etc/tinc/vpn0/hosts/serverA
#
/sbin/ifconfig $INTERFACE 10.1.0.0 netmask 255.255.0.0

$ sudo vi /etc/tinc/vpn0/tinc-down

Append the following:
#!/bin/sh
/sbin/ifconfig $INTERFACE down

tinc.1553821668.txt.gz · Dernière modification: 2019/03/29 02:07 par colin