summaryrefslogtreecommitdiff
path: root/data/templates/firewall/nftables-nat.j2
diff options
context:
space:
mode:
authorNicolas Fort <nicolasfort1988@gmail.com>2024-08-30 17:54:17 +0000
committerChristian Breunig <christian@breunig.cc>2024-09-30 17:26:24 +0200
commit8dcb042bb2352717395ba3c17bc5437534c83af5 (patch)
tree79c296ca3b938da5437d930ec5b0cebc4c1a1dbb /data/templates/firewall/nftables-nat.j2
parent4d63611ea56389b8344efb97251a79c2d41bd565 (diff)
downloadvyos-1x-8dcb042bb2352717395ba3c17bc5437534c83af5.tar.gz
vyos-1x-8dcb042bb2352717395ba3c17bc5437534c83af5.zip
T6687: add fqdn support to nat rules.
(cherry picked from commit 4c3d037f036e84c77333a400b35bb1a628a1a118)
Diffstat (limited to 'data/templates/firewall/nftables-nat.j2')
-rw-r--r--data/templates/firewall/nftables-nat.j213
1 files changed, 13 insertions, 0 deletions
diff --git a/data/templates/firewall/nftables-nat.j2 b/data/templates/firewall/nftables-nat.j2
index 4254f6a0e..8c8dd3a8b 100644
--- a/data/templates/firewall/nftables-nat.j2
+++ b/data/templates/firewall/nftables-nat.j2
@@ -19,6 +19,12 @@ table ip vyos_nat {
{% endfor %}
{% endif %}
}
+{% for set_name in ip_fqdn %}
+ set FQDN_nat_{{ set_name }} {
+ type ipv4_addr
+ flags interval
+ }
+{% endfor %}
#
# Source NAT rules build up here
@@ -31,7 +37,14 @@ table ip vyos_nat {
{{ config | nat_rule(rule, 'source') }}
{% endfor %}
{% endif %}
+
+ }
+{% for set_name in ip_fqdn %}
+ set FQDN_nat_{{ set_name }} {
+ type ipv4_addr
+ flags interval
}
+{% endfor %}
chain VYOS_PRE_DNAT_HOOK {
return