From d41903ff8082164719296cbef46d07d036241c2c Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Fri, 12 Jun 2020 00:22:58 +0200 Subject: Revert "nat: T2571: fix negated port definitions" This reverts commit 927c054d9236c2c34ca43c1cbfff10fcfd7f5077. --- data/templates/firewall/nftables-nat.tmpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'data') 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" %} -- cgit v1.2.3