Using tinc with iproute2

Sat 17 October 2015
By momo

I've been running a http://tinc-vpn.org 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.

#!/bin/sh
# tinc-up
ip tuntap add dev $INTERFACE mode tun
ip addr add 10.0.0.1/24 dev $INTERFACE
ip link set $INTERFACE up

And of course:

#!/bin/sh
# tinc-down
ip link set $INTERFACE down
ip link delete dev $INTERFACE

And that's about it.

Pages

Categories

Tags