All checks were successful
ci/woodpecker/push/demo-workflow Pipeline was successful
26 lines
782 B
Django/Jinja
26 lines
782 B
Django/Jinja
[Interface]
|
|
Address = {{ wg_address }}
|
|
ListenPort = {{ wg_port }}
|
|
PrivateKey = {{ wg_private_key_content }}
|
|
{% if wg_dns is defined %}
|
|
DNS = {{ wg_dns }}
|
|
{% endif %}
|
|
PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
|
|
PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
|
|
SaveConfig = true
|
|
|
|
{% for peer in wg_peers %}
|
|
[Peer]
|
|
PublicKey = {{ peer.public_key }}
|
|
{% if peer.preshared_key is defined %}
|
|
PresharedKey = {{ peer.preshared_key }}
|
|
{% endif %}
|
|
AllowedIPs = {{ peer.allowed_ips }}
|
|
{% if peer.endpoint is defined %}
|
|
Endpoint = {{ peer.endpoint }}
|
|
{% endif %}
|
|
{% if peer.persistent_keepalive is defined %}
|
|
PersistentKeepalive = {{ peer.persistent_keepalive }}
|
|
{% endif %}
|
|
{% endfor %}
|