ansible-ffibk/roles/network-ffrl/templates/ffrl.j2

17 lines
763 B
Text
Raw Normal View History

#
# {{ ansible_managed }}
#
auto {{ item.key }}
iface {{ item.key }} inet static
address {{ item.value.tunnel_ipv4_address }}
netmask {{ item.value.tunnel_ipv4_netmask }}
pre-up /sbin/ip tunnel add $IFACE mode gre local {{ ansible_default_ipv4.address | ipaddr('public') }} remote {{ item.value.public_ipv4_address | ipaddr('public') }} ttl 255
post-up /sbin/ip link set $IFACE mtu 1400
post-up /sbin/ip addr add {{ ffrl_public_ipv4_nat }}/32 dev $IFACE
post-down /sbin/ip tunnel del $IFACE
iface {{ item.key }} inet6 static
address {{ item.value.tunnel_ipv6_network | ipaddr('net') | ipaddr('2') | ipaddr('address') }}
netmask {{ item.value.tunnel_ipv6_netmask }}