diff options
author | Kyle Swenson <kyle.swenson@est.tech> | 2024-02-09 02:56:31 +0300 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2024-02-15 02:20:00 +0300 |
commit | 0f1ae2821fa4b13ab0f5ad7ff89fa57efcb04fe0 (patch) | |
tree | 0f836a472f63ddd356d8bec467e2ad6f33ac9925 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | f6374a82fc85bf911d033e2fa791372ce3356270 (diff) | |
download | linux-0f1ae2821fa4b13ab0f5ad7ff89fa57efcb04fe0.tar.xz |
netfilter: nat: restore default DNAT behavior
When a DNAT rule is configured via iptables with different port ranges,
iptables -t nat -A PREROUTING -p tcp -d 10.0.0.2 -m tcp --dport 32000:32010
-j DNAT --to-destination 192.168.0.10:21000-21010
we seem to be DNATing to some random port on the LAN side. While this is
expected if --random is passed to the iptables command, it is not
expected without passing --random. The expected behavior (and the
observed behavior prior to the commit in the "Fixes" tag) is the traffic
will be DNAT'd to 192.168.0.10:21000 unless there is a tuple collision
with that destination. In that case, we expect the traffic to be
instead DNAT'd to 192.168.0.10:21001, so on so forth until the end of
the range.
This patch intends to restore the behavior observed prior to the "Fixes"
tag.
Fixes: 6ed5943f8735 ("netfilter: nat: remove l4 protocol port rovers")
Signed-off-by: Kyle Swenson <kyle.swenson@est.tech>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions