tinc MAC address

Azul mail at azulinho.com
Mon Jan 16 14:28:08 CET 2017


awesome!

thanks a million


On 16 January 2017 at 13:00, Guus Sliepen <guus at tinc-vpn.org> wrote:

> 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 <guus at tinc-vpn.org>
>
> _______________________________________________
> tinc mailing list
> tinc at tinc-vpn.org
> https://www.tinc-vpn.org/cgi-bin/mailman/listinfo/tinc
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.tinc-vpn.org/pipermail/tinc/attachments/20170116/85543b4a/attachment.html>


More information about the tinc mailing list