From 9ec1670a262597356c24bff27d473eccceb45b61 Mon Sep 17 00:00:00 2001 From: Niklas Yann Wettengel Date: Wed, 28 Jul 2021 01:12:10 +0200 Subject: wg --- roles/configure_static_routes/templates/ffmyk-iproute-up.j2 | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'roles/configure_static_routes/templates/ffmyk-iproute-up.j2') diff --git a/roles/configure_static_routes/templates/ffmyk-iproute-up.j2 b/roles/configure_static_routes/templates/ffmyk-iproute-up.j2 index 29afdb9..87e63a5 100644 --- a/roles/configure_static_routes/templates/ffmyk-iproute-up.j2 +++ b/roles/configure_static_routes/templates/ffmyk-iproute-up.j2 @@ -2,12 +2,22 @@ ip -4 rule add iif bat{{ item.name }} table ffmyk priority 10 ip -6 rule add iif bat{{ item.name }} table ffmyk priority 10 +{% if item.net4 is defined %} ip -4 rule add from {{ item.net4 }} table ffmyk priority 10 +{% endif %} +{% if item.net6 is defined %} ip -6 rule add from {{ item.net6 }} table ffmyk priority 10 +{% endif %} ip -4 rule add from all iif bat{{ item.name }} type unreachable priority 200 ip -6 rule add from all iif bat{{ item.name }} type unreachable priority 200 +{% if item.net4 is defined %} ip -4 route replace {{item.net4 }} dev bat{{ item.name }} proto static table ffmyk +{% endif %} +{% if item.net6 is defined %} ip -6 route replace {{item.net6 }} dev bat{{ item.name }} proto static table ffmyk +{% endif %} +{% if item.site_net6 is defined %} ip -6 route replace {{item.site_net6 }} dev bat{{ item.name }} proto static table ffmyk +{% endif %} -- cgit v1.2.3-54-g00ecf