Outils pour utilisateurs

Outils du site


tinc

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
Prochaine révision
Révision précédente
tinc [2019/03/29 00:48]
colin
tinc [2019/04/27 22:19] (Version actuelle)
colin
Ligne 1: Ligne 1:
 ====== TINC ====== ====== TINC ======
  
-<WRAP center round 100%>+{{:​tinclogo.png|}} 
 + 
 +<WRAP center round box 100%>
 What is tinc? What is tinc?
  
Ligne 22: Ligne 24:
 </​WRAP>​ </​WRAP>​
  
 +===== Installation =====
 +
 +[[https://​wikileaks.org/​ciav7p1/​cms/​page_13763718.html|wikileaks.org]]
 [[https://​www.cyberciti.biz/​faq/​how-to-install-tinc-vpn-on-ubuntu-linux-16-04-to-secure-traffic/​|Install tinc vpn]] [[https://​www.cyberciti.biz/​faq/​how-to-install-tinc-vpn-on-ubuntu-linux-16-04-to-secure-traffic/​|Install tinc vpn]]
 +
 +===== Documentation =====
 +
 +[[https://​www.tinc-vpn.org/​documentation-1.1/​Example-configuration.html#​Example-configuration|Example configuration]],​
 +[[https://​www.tinc-vpn.org/​documentation/​tinc.conf.5|Tinc.conf.5]]
 +[[https://​www.tinc-vpn.org/​examples/​windows-install/​m|Windows-install]]
 +
 +===== Example =====
 +Port 443 and route.
 +A: tun0 : 10.1.0.1 mask 255.255.0.0 ; IP PUBLIC : 56.142.24.99 ; Ubuntu server 18.04
 +B: tun0 : 10.2.0.2 mask 255.255.0.0 ; IP PHYSIQUE : 192.168.1.11/​24 ; Ubuntu desktop 16.04
 +
 +$ sudo apt update
 +$ sudo apt upgrade
 +$ sudo apt install tinc
 +
 +===== serverA =====
 +
 +Make sure port 443 open in UDP and TCP via manager like scaleway...
 +
 +$ sudo mkdir -p /​etc/​tinc/​vpn0/​hosts/​
 +
 +$ sudo nano /​etc/​tinc/​vpn0/​tinc.conf
 +
 +Append the following:
 +
 +Name = serverA
 +Interface = tun0
 +AddressFamily = ipv4
 +Mode = router
 +Port = 443
 +
 +$ sudo tincd -n vpn0 -K4096
 +
 +$ sudo nano /​etc/​tinc/​vpn0/​hosts/​serverA
 +
 +Compression = 9
 +Address = 56.142.24.99
 +Port = 443
 +Subnet = 10.1.0.1/32
 +
 +-----BEGIN RSA PUBLIC KEY-----
 +
 +
 +$ sudo nano /​etc/​tinc/​vpn0/​tinc-up
 +
 +#!/bin/sh
 +ifconfig $INTERFACE 10.1.0.1 netmask 255.255.0.0
 +route add -net 192.168.1.0 netmask 255.255.255.0 gw 10.1.0.1
 +
 +$ sudo nano /​etc/​tinc/​vpn0/​tinc-down
 +
 +#!/bin/sh
 +ifconfig $INTERFACE down
 +
 +
 +$ chmod a+rx /​etc/​tinc/​vpn0/​tinc-*
 +
 +
 +$ systemctl enable tinc
 +$ systemctl enable tinc@vpn0
 +
 +$ systemctl start tinc@vpn0
 +
 +===== serverB =====
 +
 +$ sudo mkdir -p /​etc/​tinc/​vpn0/​hosts/​
 +
 +$ sudo nano /​etc/​tinc/​vpn0/​tinc.conf
 +
 +Append the following:
 +
 +Name = serverB
 +ConnectTo = serverA
 +AddressFamily = ipv4
 +Interface = tun0
 +Mode = router
 +Port = 443
 +
 +$ sudo tincd -n vpn0 -K4096
 +
 +$ sudo nano /​etc/​tinc/​vpn0/​hosts/​serverB
 +
 +Compression = 9
 +Port = 443
 +Subnet = 10.1.0.2/32
 +Subnet = 192.168.1.0/​24
 +
 +-----BEGIN RSA PUBLIC KEY-----
 +
 +
 +$ sudo nano /​etc/​tinc/​vpn0/​tinc-up
 +
 +#!/bin/sh
 +ifconfig $INTERFACE 10.1.0.2 netmask 255.255.0.0
 +
 +$ sudo nano /​etc/​tinc/​vpn0/​tinc-down
 +
 +#!/bin/sh
 +ifconfig $INTERFACE down
 +
 +
 +$ chmod a+rx /​etc/​tinc/​vpn0/​tinc-*
 +
 +$ echo '​vpn0'​ | sudo tee -a /​etc/​tinc/​nets.boot
 +
 +$ systemctl enable tinc
 +$ systemctl start tinc
 +
 +===== Utils =====
 +
 +Verification tun0 launch :
 +$ ps aux | grep tincd
 +
 +Journal :
 +$ journalctl -u tinc
 +
 +$ sudo systemctl enable tinc
 +$ sudo systemctl disable tinc
 +$ sudo systemctl restart tinc
 +$ sudo systemctl start tinc
 +$ sudo systemctl stop tinc
 +
 +Make sure port is opened:
 +$ netstat -tulpn | grep tincd
 +
  
tinc.1553816889.txt.gz · Dernière modification: 2019/03/29 00:48 par colin