Using tinc with iproute2

Sat 17 October 2015
By momo

I've been running a VPN for about 3 years now and lately came to the decision to improve my setup. One thing I came across was that all my scripts were using net-tools in their tinc-up and tinc-down scripts, meaning commands such as ifconfig etc..
As I enjoy working with iproute2 it was time for me to make the switch.

# tinc-up
ip tuntap add dev $INTERFACE mode tun
ip addr add dev $INTERFACE
ip link set $INTERFACE up

And of course:

# tinc-down
ip link set $INTERFACE down
ip link delete dev $INTERFACE

And that's about it.