summaryrefslogtreecommitdiff
path: root/roles/configure_static_routes/templates
diff options
context:
space:
mode:
authorNiklas Yann Wettengel <niyawe@niyawe.de>2017-07-14 10:09:35 +0200
committerNiklas Yann Wettengel <niyawe@niyawe.de>2017-07-14 10:09:35 +0200
commita72158a848349b4d56ace77ff5da78c577cfb968 (patch)
tree7cd4b0e01c598ac917c4d59392c89c07258a6506 /roles/configure_static_routes/templates
parent4136cb974eb10abfe03fdeb9f52a40032cbc9b16 (diff)
changed routing policy
Diffstat (limited to 'roles/configure_static_routes/templates')
-rw-r--r--roles/configure_static_routes/templates/ffmyk-iproute-up.j215
1 files changed, 9 insertions, 6 deletions
diff --git a/roles/configure_static_routes/templates/ffmyk-iproute-up.j2 b/roles/configure_static_routes/templates/ffmyk-iproute-up.j2
index a8275da..e97f8bc 100644
--- a/roles/configure_static_routes/templates/ffmyk-iproute-up.j2
+++ b/roles/configure_static_routes/templates/ffmyk-iproute-up.j2
@@ -1,11 +1,14 @@
#!/bin/bash
-ip -4 rule add iif bat{{ item.name }} table ffmyk
-ip -6 rule add iif bat{{ item.name }} table ffmyk
-ip -4 rule add from {{ item.net4 }} table ffmyk
-ip -6 rule add from {{ item.net6 }} table ffmyk
-ip -4 rule add to {{ item.net4 }} table ffmyk
-ip -6 rule add to {{ item.net6 }} table ffmyk
+ip -4 rule add iif bat{{ item.name }} table ffmyk priority 10
+ip -6 rule add iif bat{{ item.name }} table ffmyk priority 10
+ip -4 rule add from {{ item.net4 }} table ffmyk priority 10
+ip -6 rule add from {{ item.net6 }} table ffmyk priority 10
+ip -4 rule add to {{ item.net4 }} table ffmyk priority 10
+ip -6 rule add to {{ item.net6 }} table ffmyk priority 10
+
+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
ip -4 route replace {{item.net4 }} dev bat{{ item.name }} proto static table ffmyk
ip -6 route replace {{item.net6 }} dev bat{{ item.name }} proto static table ffmyk