Browse Source

optionally set int.forward=1 via sysctl

tags/v0.9
Maximilian Eschenbacher 6 years ago
parent
commit
56f8f7c645
2 changed files with 15 additions and 0 deletions
  1. +6
    -0
      pillar.example
  2. +9
    -0
      wireguard/init.sls

+ 6
- 0
pillar.example View File

allowed_ips: allowed_ips:
- 10.0.0.3/32 - 10.0.0.3/32
- 'fdff::3/128' - '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 View File

{% endif %} {% endif %}
{% endfor %} {% endfor %}
{% 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…
Cancel
Save