Sfoglia il codice sorgente

optionally set int.forward=1 via sysctl

tags/v0.9
Maximilian Eschenbacher 6 anni fa
parent
commit
56f8f7c645
2 ha cambiato i file con 15 aggiunte e 0 eliminazioni
  1. +6
    -0
      pillar.example
  2. +9
    -0
      wireguard/init.sls

+ 6
- 0
pillar.example Vedi File

@@ -20,3 +20,9 @@ wireguard:
allowed_ips:
- 10.0.0.3/32
- 'fdff::3/128'

# optionally, a list of interfaces can be specified for which forwarding will
# be set to 1 via sysctl.present
set_forward_interfaces:
- all
- wgtest

+ 9
- 0
wireguard/init.sls Vedi File

@@ -33,3 +33,12 @@ wireguard_{{ interface }}_peer_{{ peer.get('peer') }}:
{% endif %}
{% endfor %}
{% endfor %}

{% for interface in salt['pillar.get']('wireguard:set_forward_interfaces', []) %}
net.ipv4.conf.{{interface}}.forwarding:
sysctl.present:
- value: 1
net.ipv6.conf.{{interface}}.forwarding:
sysctl.present:
- value: 1
{% endfor %}

Loading…
Annulla
Salva