On Ubuntu 22.04 I am trying to render the incoming traffic of a certain port to another ip address. I have redirected several TCP ports with this command and they all work correctly: iptables -t nat -A PREROUTING -d 82.xxx.xx.xxx -p tcp --dport 8123 -j DNAT --to-destination 10.147.19.4:8123 However, when I try to redirect a UDP port, I see it closed from the outside. I use this command. What am I doing wrong?
iptables -t nat -A PREROUTING -d 18.104.22.168 -p udp --dport 1883 -j DNAT --to-destination 10.147.19.4:51820
iptables-save -c(rather than