i need to mirror all packets from port 162 to another (for example 1162) on localhost.
I know that TEE can mirror packets but to some ip address.
Maybe it is possible in one rule change also destination port, but i can't find working solution.
Something like that:
iptables -t mangle -A PREROUTING -d 0.0.0.0:162 -j TEE --to-destination 0.0.0.0:1162
But from manual: Send the cloned packet to the host reachable at the given IP address. Use of 0.0.0.0 (for IPv4 packets) or :: (IPv6) is invalid.
Thanks for any hint.