2022-09-25 16:00:40 +02:00
|
|
|
#!/usr/bin/env -S nft -f
|
|
|
|
|
|
|
|
table ip wg0_ipv4 {
|
2022-12-09 01:16:00 +01:00
|
|
|
|
2022-12-09 22:45:58 +01:00
|
|
|
{% if vpn_wireguard_role == "server" %}
|
2022-09-25 16:00:40 +02:00
|
|
|
chain postrouting {
|
|
|
|
type nat hook postrouting priority 100;
|
2022-12-09 01:16:00 +01:00
|
|
|
iif wg0 oif {{ ansible_default_ipv4.interface }} masquerade;
|
2022-09-25 16:00:40 +02:00
|
|
|
}
|
2022-12-09 01:16:00 +01:00
|
|
|
|
|
|
|
{% endif %}
|
2022-09-25 16:00:40 +02:00
|
|
|
}
|