ansible-roles/vpn/wireguard/templates/post-up-IFACE-ipv4.nft

13 lines
317 B
Plaintext
Raw Normal View History

2022-12-20 19:47:11 +01:00
#!/usr/bin/env -S nft -f
2023-07-20 20:27:37 +02:00
table ip {{ vpn_wireguard_iface }}_ipv4 {
2022-12-20 19:47:11 +01:00
{% if vpn_wireguard_role == "server" %}
chain postrouting {
type nat hook postrouting priority 100;
2023-07-20 20:27:37 +02:00
iif {{ vpn_wireguard_iface }} oif {{ ansible_default_ipv4.interface }} masquerade;
2022-12-20 19:47:11 +01:00
}
{% endif %}
}