summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-06-12 00:22:58 +0200
committerChristian Poessinger <christian@poessinger.com>2020-06-12 00:22:58 +0200
commitd41903ff8082164719296cbef46d07d036241c2c (patch)
treeadab2d98990801d7c7864a214ad398a6b78ae631 /data
parentf79646e08b2158e4b792c2e98997a72a73a75f10 (diff)
downloadvyos-1x-d41903ff8082164719296cbef46d07d036241c2c.tar.gz
vyos-1x-d41903ff8082164719296cbef46d07d036241c2c.zip
Revert "nat: T2571: fix negated port definitions"
This reverts commit 927c054d9236c2c34ca43c1cbfff10fcfd7f5077.
Diffstat (limited to 'data')
-rw-r--r--data/templates/firewall/nftables-nat.tmpl4
1 files changed, 2 insertions, 2 deletions
diff --git a/data/templates/firewall/nftables-nat.tmpl b/data/templates/firewall/nftables-nat.tmpl
index 0a3dfa369..abb32ddc6 100644
--- a/data/templates/firewall/nftables-nat.tmpl
+++ b/data/templates/firewall/nftables-nat.tmpl
@@ -29,9 +29,9 @@ add rule ip raw NAT_CONNTRACK counter accept
{% macro nat_rule(rule, chain) %}
{% set src_addr = "ip saddr " + rule.source_address if rule.source_address %}
-{% set src_port = "sport " + rule.source_port if rule.source_port %}
+{% set src_port = "sport { " + rule.source_port +" }" if rule.source_port %}
{% set dst_addr = "ip daddr " + rule.dest_address if rule.dest_address %}
-{% set dst_port = "dport " + rule.dest_port if rule.dest_port %}
+{% set dst_port = "dport { " + rule.dest_port +" }" if rule.dest_port %}
{% set comment = "DST-NAT-" + rule.number %}
{% if chain == "PREROUTING" %}