ansible-edda/playbooks/roles/vpn/wireguard/templates/post-up-wg0-ipv4.nft.j2

13 lines
273 B
Django/Jinja

#!/usr/bin/env -S nft -f
table ip wg0_ipv4 {
{% if vpn_wireguard_role == "server" %}
chain postrouting {
type nat hook postrouting priority 100;
iif wg0 oif {{ ansible_default_ipv4.interface }} masquerade;
}
{% endif %}
}