#command
sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8080
#save configration
sudo apt-get install iptables-persistent
sudo invoke-rc.d iptables-persistent save
#clear
sudo /etc/init.d/iptables-persistent flush