sudo sysctl net.ipv4.ip_forward=1
sudo iptables -A PREROUTING -t nat -p tcp --dport 80 -j REDIRECT --to-ports 8080
sudo iptables -t nat -A OUTPUT -o lo -p tcp --dport 80 -j REDIRECT --to-port 8080
Route TCP 80 to 8080 IPTables
How to route your traffic from any port to port 80 (HTTP) on Linux with iptables.