2017-10-03 14:37:39 +02:00
|
|
|
{% set ip4hex = item.value.ipv4_network | ipaddr('net') | ipaddr(magic) | ipaddr('address') | ip4_hex() -%}
|
|
|
|
{% set mac = '0212' + ip4hex -%}
|
2017-09-05 12:01:27 +02:00
|
|
|
#
|
|
|
|
# {{ ansible_managed }}
|
|
|
|
#
|
|
|
|
log level warn;
|
|
|
|
hide ip addresses yes;
|
|
|
|
hide mac addresses yes;
|
|
|
|
|
|
|
|
method "aes128-ctr+umac";
|
|
|
|
|
|
|
|
interface "{{ item.key }}igVPN";
|
|
|
|
|
|
|
|
bind {{ ansible_default_ipv4.address | ipaddr('public') }}:101{{ item.value.site_number }};
|
|
|
|
bind {{ ansible_default_ipv6.address | ipaddr('public') | ipwrap }}:101{{ item.value.site_number }};
|
|
|
|
|
|
|
|
include "secret.conf";
|
|
|
|
mtu 1406;
|
|
|
|
|
|
|
|
peer group "servers" {
|
|
|
|
include peers from "peers/gates";
|
|
|
|
include peers from "peers/services";
|
|
|
|
}
|
|
|
|
|
2017-10-03 14:37:39 +02:00
|
|
|
on up "
|
|
|
|
ip link set $INTERFACE down
|
2017-10-03 15:13:00 +02:00
|
|
|
ip link set address {{ mac | hwaddr('linux') }} dev $INTERFACE
|
2017-10-03 14:37:39 +02:00
|
|
|
ip link set $INTERFACE up
|
|
|
|
|
|
|
|
batctl -m {{ item.key }}BAT if add $INTERFACE
|
|
|
|
";
|
|
|
|
|
|
|
|
on down "
|
|
|
|
batctl -m {{ item.key }}BAT if del $INTERFACE
|
|
|
|
";
|
|
|
|
|
2017-09-05 12:01:27 +02:00
|
|
|
status socket "/var/run/fastd-{{ item.key }}ig.status";
|