I'm trying to combine multiple one-port dst-nat rules into an other one with the range of those ports.
These are the rules and the netcat who test them:
Code: Select all
add action=dst-nat chain=dstnat dst-address=PUB_IP dst-port=10000 protocol=udp to-addresses=PRIV_IP
add action=dst-nat chain=dstnat dst-address=PUB_IP dst-port=10001 protocol=udp to-addresses=PRIV_IP
Code: Select all
$ nc -v -u -z -w 3 PUB_IP 10000-10001
Connection to PUB_IP 10000 port [udp/*] succeeded!
Connection to PUB_IP 10001 port [udp/*] succeeded!
If I replace the two rules with one and with a range in dst-port, it only works the first one:
Code: Select all
add action=dst-nat chain=dstnat dst-address=PUB_IP dst-port=10000-10001 protocol=udp to-addresses=PRIV_IP
Code: Select all
$ nc -v -u -z -w 3 PUB_IP 10000-10001
Connection to PUB_IP 10000 port [udp/*] succeeded!
Thanks,