File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
templates/etc/wireguard/inc Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 2
2
{% for net in wg_peer .AllowedIPs | ensure_list %}
3
3
{% for gw in wg_peer .Address | ensure_list %}
4
4
{% if gw .split ('/' )[0] != net .split ('/' )[0] %}
5
- {% if ( gw | ansible .utils .ipv 4 and net | ansible .utils .ipv 4) or ( gw | ansible . utils . ipv 6 and net | ansible . utils . ipv 6) %}
5
+ {% if gw | ansible .utils .ipv 4 and net | ansible .utils .ipv 4 %}
6
6
PostUp = ip route add {{ net }} dev %i metric {{ WG_HC.default_routing_metric + loop.index }} via {{ gw.split('/')[0] }}
7
+ {% elif gw | ansible .utils .ipv 6 and net | ansible .utils .ipv 6 %}
8
+ PostUp = ip -6 route add {{ net }} dev %i metric {{ WG_HC.default_routing_metric + loop.index }} via {{ gw.split('/')[0] }}
7
9
{% endif %}
8
10
{% endif %}
9
11
{% endfor %}
You can’t perform that action at this time.
0 commit comments