On Mon, Jan 16, 2017 at 11:31:18AM +0000, Azul wrote:

> Tinc will generate a new MAC address every time the daemon restarts.

It is actually the kernel that generates a new MAC address for the
tun/tap interface.

> if there a way to control that tinc MAC behaviour ? ie. generate it once
> and re-used that same one every time ?

You can set the MAC address yourself in the tinc-up script. On Linux for
example:

#!/bin/sh
ip link set $IFACE address 12:34:56:78:9a:bc
# other commands here

If you want to automate it so it automatically stores the
kernel-generated address the first time and reuses it later, you can do
something like this:

#!/bin/sh
macfile=/etc/tinc/$NETNAME/address
if [ -f $macfile ]; then
        ip link set $IFACE address `cat $macfile`
else
        cat /sys/class/net/$IFACE/address >$macfile
fi
# other commands here

-- 
Met vriendelijke groet / with kind regards,
     Guus Sliepen <[email protected]>

Attachment: signature.asc
Description: Digital signature

_______________________________________________
tinc mailing list
[email protected]
https://www.tinc-vpn.org/cgi-bin/mailman/listinfo/tinc

Reply via email to