Index of /Reseau/tinc

[ICO]NameLast modifiedSizeDescription

[PARENTDIR]Parent Directory  -  

root@bzn:~# apt-get install tinc
root@bzn:~# cd /etc/tinc
root@bzn:/etc/tinc# mkdir -p private/hosts

root@bzn:/etc/tinc# cat private/tinc.conf 
Name = bzn
AddressFamily = ipv4
Interface = tun0
Device = /dev/net/tun

root@bzn:/etc/tinc/private# cat tinc-up
ifconfig $INTERFACE netmask

root@bzn:/etc/tinc# tincd -n private -K4096

root@bzn:/etc/tinc# cat nets.boot 
## This file contains all names of the networks to be started on system startup.


root@hive:/etc/tinc/valhalla# cat tinc.conf 
Name = hive
AddressFamily = ipv4
ConnectTo = bzn
Interface = tun0
Device = /dev/net/tun

root@hive:/etc/tinc/valhalla/hosts# cat hive 
Subnet =

root@hive:/etc/tinc/valhalla/hosts# cat bzn
Address = 
Subnet =

doas pkg_add lzo

liblzo sous openBSD : 
./configure --with-lzo-include=/usr/local/include/lzo --with-lzo-lib=/usr/local/lib
./configure --with-zlib=/usr/local/

./configure --prefix=/usr/local/ --with-lzo=/usr/local/

Mode switch sous openBSD : 
Si mal configure (juste mode switch dans la conf), le message d'erreur suivant apparait : 
Error while writing to Generic BSD tap device /dev/tun0: Address family not supported by protocol family

Il faut donc rajouter dans tinc-up :
ifconfig $INTERFACE link0 up

le parametre link0 permet a l'interface tun de se comporter comme une interface tap sous linux. 
Et hop un vpn layer2 \o/

tinc-up openbsd pour routage par default :
route add $(dig +short $(route -n get default | awk -F" " '/gateway/ {print $2}')
route add
route add