How to redirect a port using iptables?

To redirect port 80 to 8080 use:

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

To list the NAT rules use:

iptables -t nat -L