From 927c054d9236c2c34ca43c1cbfff10fcfd7f5077 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Thu, 11 Jun 2020 16:54:00 +0200 Subject: nat: T2571: fix negated port definitions --- data/templates/firewall/nftables-nat.tmpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'data/templates/firewall') diff --git a/data/templates/firewall/nftables-nat.tmpl b/data/templates/firewall/nftables-nat.tmpl index abb32ddc6..0a3dfa369 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