Port forwarding issues with Ubuntu 10.04

Hi,

I’m about to deploy Openfire on a public server and would like to forward 80 to 5222. I have configured the iptables as follows.

iptables -t nat -A PREROUTING -p tcp --dport 80 -i eth0 -j REDIRECT --to-port 5222

but it doesn’t work.

I tried as per the discussions on this forum.