I'm working with a Tomcat application that I inherited. The server has port 80 forwarding to 8080 to mask the default port.

When I type iptables --list I get

Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

When I type netstat -anp --tcp --udp there is no reference to port 80

grepping through my /etc/init.d dir I can't find any relevant references to port 80.

This is all hosted on an ec2 - is it possible this is being forwarded at a higher level?

The reason I want to remove the current port forwarding is to move the application over to Varnish for both forwarding and caching

link|improve this question
feedback

2 Answers

Tomcat listens on 8080 by default, because it's assumed that apache will be running as well, and that'd cause all kinds of conflicts. Here is a short tutorial on how to get it to run on 80.

link|improve this answer
Thanks but that's not quite what I'm looking for. The port forwarding from 80 to 8080 is already in place; I just can't find anything that references how or why this is working – Jared Jul 20 '11 at 21:55
feedback

Figured it out.

There is a rule written in /etc/rc.local to create a PREROUTING rewrite rule from port 80 to 8080

Since it was prerouting it didn't show up in by calling iptables -L, but it did with iptables -t nat -L

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.