summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorNicolas Fort <nicolasfort1988@gmail.com>2024-08-30 17:54:17 +0000
committerNicolas Fort <nicolasfort1988@gmail.com>2024-09-16 11:35:26 +0000
commit4c3d037f036e84c77333a400b35bb1a628a1a118 (patch)
tree226dcbe2f55acf9d5e482deb79bf47e6da000d03 /data
parent2feed8f99c6056ea8f6fd1da88ab14fa17a0a84e (diff)
downloadvyos-1x-4c3d037f036e84c77333a400b35bb1a628a1a118.tar.gz
vyos-1x-4c3d037f036e84c77333a400b35bb1a628a1a118.zip
T6687: add fqdn support to nat rules.
Diffstat (limited to 'data')
-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