Hello all
I am seeing a problem with port range forwarding (different source range to target range, but same number of ports)
For the following rule:
/ip firewall nat add action=dst-nat chain=dstnat comment="redirect port range" dst-address=185.50.105.156 dst-port=32123-32160 protocol=udp src-address=192.168.10.50 to-addresses=192.168.10.2 to-ports=32223-32260
Log shows:
prerouting: in:bridge_lan out:(unknown 0), src-mac 40:8d:5c:44:ef:ff, proto UDP, 192.168.10.50:58228->185.50.105.156:32127, NAT (192.168.10.50:58228->192.168.10.1:58228)->(195.50.105.157:32127->192.168.10.2:32260), len 576
So even though the client is trying to reach port 32127 (which is not the last port in the dst-port range), DST-NAT is pushing them to port 32260 (which is the last port to-ports range)
To work around this, I had to create a manual dst-nat rule for each port, now everything is fine… but my firewall is clogged with several rules
Am I doing something wrong here, or is this a (pretty serious…?) bug?
I presume it works fine if to-ports==dst-ports, but intuitively it should work if to-ports != dst-ports but the port count is the same… (but I did not test same ports, only reporting this issue with different ports)
Thank you..
I’m running v6.47.1