ansible-ffibk/roles/service-fastd-intragate/templates/fastd-intragate.conf.j2
Tobias Hachmer 2f32bd6c1e Restructure network interfaces in order to use ifupdown2
- rewrite interface templates for batman, fastd, ffrl and meshbridge
- add package ethtool to role server-basic
- use more ipaddr filters and get rid of unneeded variables in dict
ffrl_exit_server
- change ffrl_public_ipv4_nat variable to ip/prefix format
- update readme files
2017-10-03 14:37:39 +02:00

37 lines
921 B
Django/Jinja

{% set ip4hex = item.value.ipv4_network | ipaddr('net') | ipaddr(magic) | ipaddr('address') | ip4_hex() -%}
{% set mac = '0212' + ip4hex -%}
#
# {{ 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";
}
on up "
ip link set $INTERFACE down
ip link set address {{ mac }} dev $INTERFACE
ip link set $INTERFACE up
batctl -m {{ item.key }}BAT if add $INTERFACE
";
on down "
batctl -m {{ item.key }}BAT if del $INTERFACE
";
status socket "/var/run/fastd-{{ item.key }}ig.status";