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
#!/bin/sh
ifconfig $INTERFACE 172.16.15.1 netmask 255.255.255.0

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.
private

--------------------------------------------

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 = 172.16.15.2/32
-----BEGIN RSA PUBLIC KEY-----


root@hive:/etc/tinc/valhalla/hosts# cat bzn
Address = 
Subnet = 172.16.15.1/32
-----BEGIN RSA PUBLIC KEY-----


doas pkg_add lzo

liblzo sous openBSD : 
./configure --with-lzo-include=/usr/local/include/lzo --with-lzo-lib=/usr/local/lib
ou
./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 foogw.bar.org) $(route -n get default | awk -F" " '/gateway/ {print $2}')
route add 0.0.0.0/1 172.22.151.245
route add 128.0.0.0/1 172.22.151.245