Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question

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.

share|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

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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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