You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ffmyk-ansible/roles/configure_static_routes/templates/ffmyk-iproute-up.j2

24 lines
882 B
Plaintext

8 years ago
#!/bin/bash
ip -4 rule add iif bat{{ item.name }} table ffmyk priority 10
ip -6 rule add iif bat{{ item.name }} table ffmyk priority 10
3 years ago
{% if item.net4 is defined %}
ip -4 rule add from {{ item.net4 }} table ffmyk priority 10
3 years ago
{% endif %}
{% if item.net6 is defined %}
ip -6 rule add from {{ item.net6 }} table ffmyk priority 10
3 years ago
{% 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
8 years ago
3 years ago
{% if item.net4 is defined %}
8 years ago
ip -4 route replace {{item.net4 }} dev bat{{ item.name }} proto static table ffmyk
3 years ago
{% endif %}
{% if item.net6 is defined %}
8 years ago
ip -6 route replace {{item.net6 }} dev bat{{ item.name }} proto static table ffmyk
3 years ago
{% endif %}
{% if item.site_net6 is defined %}
ip -6 route replace {{item.site_net6 }} dev bat{{ item.name }} proto static table ffmyk
3 years ago
{% endif %}