I have a web server running on port 8080. I'd like to visit it via port 80, so I did this:
iptables -t nat -A PREROUTING -p tcp -m tcp --dport 80 -j REDIRECT --to-port 8080
it works if i access the server from other machines using
but it doesn't work if I access the server from the same machine using
why is that?
thanks in advance.