How can I port-forward port 80 internally to port 8080?
My goal is to have a web app server (Glassfish) running on port 8080, but for the outside world to access it normally on port 80. This is being done so that I don't have to run Glassfish as root.
I tried adding the following rule to my /etc/sysconfig/iptables:
-A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080
but this results in the following error:
Applying iptables firewall rules: iptables-restore v1.3.5: Line 21 seems to have a -t table option.