Explorar el Código

optionally set int.forward=1 via sysctl

tags/v0.9
Maximilian Eschenbacher hace 6 años
padre
commit
56f8f7c645
Se han modificado 2 ficheros con 15 adiciones y 0 borrados
  1. +6
    -0
      pillar.example
  2. +9
    -0
      wireguard/init.sls

+ 6
- 0
pillar.example Ver fichero

@@ -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 Ver fichero

@@ -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 %}

Cargando…
Cancelar
Guardar