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