I want to redirect all traffic from port 443 to the internal port 8080. I'm using this config for iptables:
iptables -t nat -I PREROUTING --source 0/0 --destination 0/0 -p tcp --dport 443 -j REDIRECT --to-ports 8080
This works for all external clients. But if I'm trying to access the port 443 from the same maschine I'll get a connection refused error.
How can I extend the iptables rule to redirect local traffic too?